Google made breaking changes in protobuf (see e.g. here), in the generation and parsing of _pb2.py generated files.
Re the python protobuf package, the 3.20.1 release is followed by the 4.21.1 release.
AFAICT protoc >=3.19 generates _pb2.py files in the new format, while older protoc generates the old format.
AFAICT
- protobuf 3.20.x is able to parse both the old and the new format,
protobuf<3.20 can only parse the old format,
protobuf>=3.21 (i.e. protobuf>=4) can only parse the new format
We rely on protobuf to parse _pb2.py files at runtime:
- directly for
paymentrequest_pb2.py
- indirectly via
bitbox02 (hww plugin)
- indirectly via
keepkey (hww plugin)
- Currently, our
_pb2.py file(s) is in the old format, and we require protobuf>=3.12,<4.
- bitbox02 has
_pb2.py file(s)
- for bitbox02<6.1.0, in the old format
- for bitbox02==6.1.0, in the new format
- and it requires "protobuf>=3.21" (i.e. "protobuf>=4")
- related PR
would be nice if they relaxed this to accept 3.20.x (done in PR, thanks!)
- for bitbox02>=6.1.1, in the new format
- and it requires "protobuf>=3.20"
- keepkey has
_pb2.py file(s) in the old format
- I've asked them to regenerate in new format and publish a new release
Google made breaking changes in protobuf (see e.g. here), in the generation and parsing of
_pb2.pygenerated files.Re the python
protobufpackage, the 3.20.1 release is followed by the 4.21.1 release.AFAICT protoc >=3.19 generates
_pb2.pyfiles in the new format, while older protoc generates the old format.AFAICT
protobuf<3.20can only parse the old format,protobuf>=3.21(i.e.protobuf>=4) can only parse the new formatWe rely on
protobufto parse_pb2.pyfiles at runtime:paymentrequest_pb2.pybitbox02(hww plugin)keepkey(hww plugin)_pb2.pyfile(s) is in the old format, and we requireprotobuf>=3.12,<4._pb2.pyfile(s)would be nice if they relaxed this to accept 3.20.x(done in PR, thanks!)_pb2.pyfile(s) in the old format