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

Allow using protobuf version 5 and later #6683

Merged
merged 3 commits into from
Jul 31, 2024
Merged

Allow using protobuf version 5 and later #6683

merged 3 commits into from
Jul 31, 2024

Conversation

maffoo
Copy link
Contributor

@maffoo maffoo commented Jul 30, 2024

Fixes #6651

I've updated arg_func_lang_test.py to pass the new or old kwarg to json_format.MessageToDict based on inspecting the function signature, so it works with old and new versions of protobuf. This will unblock upgrades that we need to do internally to work with python 3.12.

@maffoo maffoo requested review from wcourtney, vtomole, verult and a team as code owners July 30, 2024 22:50
@CirqBot CirqBot added the size: S 10< lines changed <50 label Jul 30, 2024
@@ -35,6 +37,15 @@
from cirq.qis import CliffordTableau


def _json_format_kwargs() -> Dict[str, bool]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add a TODO comment to delete this once we require protobuf>=5?

Copy link
Collaborator

@pavoljuhas pavoljuhas left a comment

Choose a reason for hiding this comment

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

LGTM with a tiny suggestion. Thank you!

Copy link

codecov bot commented Jul 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.82%. Comparing base (c58a05c) to head (db7f9c2).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6683      +/-   ##
==========================================
- Coverage   97.82%   97.82%   -0.01%     
==========================================
  Files        1074     1074              
  Lines       92118    92126       +8     
==========================================
+ Hits        90116    90120       +4     
- Misses       2002     2006       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@maffoo maffoo enabled auto-merge (squash) July 31, 2024 14:49
@maffoo maffoo merged commit bae02e4 into main Jul 31, 2024
35 checks passed
@maffoo maffoo deleted the u/maffoo/proto5 branch August 13, 2024 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: S 10< lines changed <50
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update protobuf API calls so it does not have to be pinned to protobuf-4
3 participants