You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.venv/lib/python3.12/site-packages/protovalidate/internal/rules.py:863: DeprecationWarning: label() is deprecated. Use is_required() or is_repeated() instead.
self._cache[descriptor] = self._new_rules(descriptor)
which stem from the fact that there are many accesses to FieldDescriptor.label which was deprecated in July 2025: https://protobuf.dev/news/2025-07-14/
These warnings start appearing when using the library with protobuf 6.x.
I'm going to close this out in the sense that we don't plan on addressing these until dropping support for protobuf==5, which may be a while — still, if anyone wants to contribute the necessary runtime patching needed, I'm open to reviewing a PR!
I'm going to close this out in the sense that we don't plan on addressing these until dropping support for protobuf==5, which may be a while — still, if anyone wants to contribute the necessary runtime patching needed, I'm open to reviewing a PR!
I am open to contributing a patch as it would move my project forward. When you say "runtime patching", do you mean to add a branch for
sys.version_info>= (3, 14)
and define a new set of functions that call the non-deprecated APIs?
@y4n9squared something like that, although I think the version check would be on the protobuf version in use — I think they introduced the new APIs / deprecated the old APIs somewhere in the runtime 6.x versions; we ought to use the new APIs when they're available based on the version check.
@y4n9squared something like that, although I think the version check would be on the protobuf version in use — I think they introduced the new APIs / deprecated the old APIs somewhere in the runtime 6.x versions; we ought to use the new APIs when they're available based on the version check.
My bad. Yes, it will be on the proto library version.
@y4n9squared it shouldn't be too tricky to switch, but in case you needed a pointer, I attempted to switch to the newer APIs in #371. I imagine a helper function defined based on the runtime protobuf version to wrap those callsites would be a good approach.
Activity
stefanvanburen commentedon Dec 18, 2025
hey @y4n9squared — yeah, unfortunately that's expected; we support the
protobufruntime back to version 5, and I don't think those APIs are available to us until protobuf 6.x.I imagine there's maybe a runtime check we could do to see if we're on protobuf>6 and use the appropriate APIs; open to contributions!
stefanvanburen commentedon Dec 29, 2025
I'm going to close this out in the sense that we don't plan on addressing these until dropping support for
protobuf==5, which may be a while — still, if anyone wants to contribute the necessary runtime patching needed, I'm open to reviewing a PR!y4n9squared commentedon Jan 6, 2026
I am open to contributing a patch as it would move my project forward. When you say "runtime patching", do you mean to add a branch for
and define a new set of functions that call the non-deprecated APIs?
stefanvanburen commentedon Jan 6, 2026
@y4n9squared something like that, although I think the version check would be on the
protobufversion in use — I think they introduced the new APIs / deprecated the old APIs somewhere in the runtime6.xversions; we ought to use the new APIs when they're available based on the version check.y4n9squared commentedon Jan 6, 2026
My bad. Yes, it will be on the proto library version.
stefanvanburen commentedon Jan 6, 2026
@y4n9squared it shouldn't be too tricky to switch, but in case you needed a pointer, I attempted to switch to the newer APIs in #371. I imagine a helper function defined based on the runtime protobuf version to wrap those callsites would be a good approach.
Skip DeprecationWarnings
Add protovalidate support with protobuf v7 FieldDescriptor.label fix
mkanat commentedon Mar 2, 2026
So, protobuf 7 actually removed
.label, so now protovalidate is broken when using protobuf 7.Add handling for protobuf==7
Add handling for protobuf==7
stefanvanburen commentedon Mar 2, 2026
hey @mkanat, thanks for the shout - opened #429 to get that fixed up.
Add handling for protobuf==7 (#429)
stefanvanburen commentedon Mar 2, 2026
Fix released in
v1.1.2. Thanks for mentioning @mkanat, and thanks for the original report @y4n9squared!