Skip to content

Pin code generator versions - #837

Merged
julianoes merged 1 commit into
mainfrom
pr-pin-generator
Nov 24, 2026
Merged

julianoes merged 1 commit into
mainfrom
pr-pin-generator

Conversation

@julianoes

Copy link
Copy Markdown
Collaborator

The release bot's first PR (#836) changed all 94 generated files because requirements-dev.txt allowed any grpcio-tools>=1.40.0 and it installed 1.85.3. That regenerated every *_pb2*.py and would have required protobuf >= 7.35.1 and grpcio >= 1.85.3 at import time, while requirements.txt allows protobuf 6.x and older grpcio.

  • Pin grpcio-tools==1.75.0, protoc-gen-mavsdk==2.1.0, ruff==0.17.6. Regenerating current main with these gives zero diff; regenerating MAVSDK v4.2.1 gives only the 24 files with real changes.
  • Old gencode runs fine on newer runtimes (checked: current bindings import cleanly with protobuf 7.36.2 / grpcio 1.85.3), so staying on the old generator keeps compatibility widest.
  • grpcio-tools 1.75.0 has wheels up to Python 3.13 only: the update workflow now uses 3.13, and the Windows job no longer installs requirements-dev.txt (it only builds wheels; it was on Python 3.15).
  • grpcio>=1.75.0 in requirements.txt: the existing *_pb2_grpc.py already raise on older grpcio.

The bindings were generated with grpcio-tools 1.75.0 but requirements-dev.txt
allowed any newer version. The release bot picked up 1.85.3, which changed
every *_pb2*.py file and raised the minimum runtime to protobuf 7.35.1 and
grpcio 1.85.3.

Pin grpcio-tools, protoc-gen-mavsdk and ruff to the versions that reproduce
the current bindings exactly. Old gencode works with newer runtimes, so this
keeps the widest compatibility.

grpcio-tools 1.75.0 has no wheels for Python > 3.13, so run the update
workflow on 3.13 and stop installing requirements-dev.txt in the Windows job,
which only builds wheels and doesn't need it.

Also raise grpcio in requirements.txt to 1.75.0: the generated *_pb2_grpc.py
files already raise at import time on anything older.

@julianoes julianoes left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea what versions we should use, but this presumably works.

@julianoes
julianoes merged commit 75bd7bf into main Nov 24, 2026
9 checks passed
@julianoes
julianoes deleted the pr-pin-generator branch November 24, 2026 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant