Migrate field label to is_repeated, enums removed in protobuf v34.0#33
Conversation
Signed-off-by: Thomas Sedlmayer <tsedlmayer@pmsfit.de>
|
Does it then still work with old protobuf versions? |
|
They seem to have introduced https://github.com/protocolbuffers/protobuf/blob/v30.2/python/google/protobuf/descriptor.py -> Didn't find any |
Signed-off-by: Thomas Sedlmayer <tsedlmayer@pmsfit.de>
|
The changeover only happened a year ago in 2025, in this commit: protocolbuffers/protobuf@5bd7d02 and is officially only part of v32 and newer, AFAICT. So if we don't want to be as unnecessarily disruptive as our google friends, I would rather suggest that forcing everyone who uses qc-osi-trace (which might be in a much larger project with lots of different protobuf users with different version requirements), we might want to do more than just switch over. Either we catch/disable the deprecation warning for now, or we provide different code for both versions (doing this in the inner loop might be a bit expensive, however, so might not want to do that trivially). We could also as an interim measure pin protobuf (we do not receive any benefits from their constant churn, imho), until this becomes clearer. Probably best approach - though uglier and really should not be necessary if google didn't yolo all the time - is to create own wrapper predicates based on detected version. |
Signed-off-by: Pierre R. Mai <pmai@pmsf.de>
|
Maybe like this, please give it a check whether this works as intended. |
|
It works for the most recent protobuf (7.34.1) and the minimally required protobuf by osi-python (6.30.2). Older versions we probably don't need to check anyways. Should I revert the protobuf dependency again then? |
Signed-off-by: Pierre R. Mai <pmai@pmsf.de>
|
CCB 2026-05-07: Merge with aligned baseline. |
See
When using protobuf versions based on v34.0 (Python package version number >7.34) I get this error in the result file: