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

Backward compatibility of the Python files generated from Protobuf files #4945

Closed
pfreixes opened this issue Jul 20, 2018 · 2 comments
Closed
Assignees

Comments

@pfreixes
Copy link

Hi,

I would like to know if the Python files that are generated from Protobuf files are backward compatibility within the same major version, for examples:

I have a Python file that belongs to a specific service that was generated by the 3.0.0 version of the protoc compiler, then this file is used in another environment by a client of the service that uses the 3.6.0 version, my two questions here are:

  1. The python file will be importable by the client that uses the newer version?
  2. If yes, the data produced by the client will be consumable by the service that uses the older version?

Cheers,

@anandolee
Copy link
Contributor

anandolee commented Jul 23, 2018

We have compatibility tests to make sure old generated code can work with new runtime:
https://github.com/google/protobuf/blob/master/python/compatibility_tests/v2.5.0/test.sh

New generated code may not work with old runtime.

For your case that 3.0.0 protoc can work with 3.6.0 runtime. 'The data produced' I assume that you are talking about wire format, and wire format is the same for all versions.

@pfreixes
Copy link
Author

@anandolee thanks for your answer and sorry to be so late.

I'm wondering why the latest older version that is tested against the current one is the 3.0.0-beta4 [1]. Why not the none beta version? Why not with all of the 3.X versions already published?

[1] https://github.com/protocolbuffers/protobuf/blob/master/python/compatibility_tests/v2.5.0/test.sh#L38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants