Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protobuf version guessing v2 #144

Merged
merged 4 commits into from
Mar 1, 2023
Merged

Protobuf version guessing v2 #144

merged 4 commits into from
Mar 1, 2023

Conversation

tilsche
Copy link
Contributor

@tilsche tilsche commented Mar 1, 2023

Supersedes #140

tilsche and others added 4 commits March 1, 2023 13:34
During the build process, protoc is invoked to build protobuf files.
These built files are deployed to users, and thus the users require a
compatible python-protobuf version.

For that, the required protobuf version is set during the build process
in setup.py. However, this version selection is not up to date with the
versioning scheme used by protobuf. protobuf keeps the major version
independent between languages, and minor/patch versions in sync.
E.g., as of the time of writing, python-protobuf 4.21.12 is compatible
with libprotoc 3.21.12.
see: https://protobuf.dev/news/2022-05-06/

However, it is not clear under which circumstances these versions are
compatible to each other. (I.e., even if minor/patch version are
different, the binary format may still be compatible.)
This makes correctly predicting the required (potentially unrealeased)
python-protobuf version impossible.

Co-authored-by: Hannes T <80697868+s9105947@users.noreply.github.com>
We don't know a specific minimum requirement, this is just eyeballing it.
Versions of protoc below 3 definitely won't match with the protobuf versioning scheme that reset the minor version at 3.0.0.
Only ignore parts of setup.py. This has two advantages: 1) If isort is applied to the file directly, e.g., by an eager IDE, it still doesn't sort the setuptools imports as needed. 2) The rest of the imports is sorted.

Also remove the configured ignore for docs/conf.py which seems to be fine.
@bmario bmario linked an issue Mar 1, 2023 that may be closed by this pull request
@bmario bmario merged commit a66da38 into master Mar 1, 2023
@bmario bmario deleted the fix-protobuf-version branch March 1, 2023 13:28
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.

protobuf version requirement is broken
2 participants