mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
As of NumPy 2.3.0rc1, numpy.bool scalars can no longer be interpreted as index values (https://github.com/numpy/numpy/releases/tag/v2.3.0rc1). This causes protobuf no longer to accept a np.bool scalar as a legal value for a boolean field. We have two options: a) either we can change protobuf so that it continues to accept NumPy boolean scalars (this change), or b) decide that protobuf should reject NumPy boolean scalars and that users must update their code to cast to a Python bool explicitly. I have no strong opinion as to which, but option (a) seems less disruptive. No test updates are needed: the existing tests fail under NumPy 2.3. PiperOrigin-RevId: 766629310 |
||
|---|---|---|
| .. | ||
| protobuf | ||
| __init__.py | ||