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

Fix failing tests for Python 3.11 #6181

Conversation

navaro1
Copy link
Contributor

@navaro1 navaro1 commented Jul 5, 2023

This commit addresses the failing tests in the cirq-core module when run with Python 3.11. The failures were due to changes in the error messages associated with the @property annotation in Python 3.11.

The changes in this commit include:

  1. Updating the expected error messages in the test cases to match either the old or the new error message format.
  2. Modifying the __repr__ method in the MeasurementType class in classical_data.py to correctly represent the enum value.

These changes ensure that the tests pass for both Python 3.11 and earlier versions.

…ssages

This commit addresses the failing tests in the cirq-core module when run with Python 3.11. The failures were due to changes in the error messages associated with the `@property` annotation in Python 3.11.

The changes in this commit include:
1. Updating the expected error messages in the test cases to match either the old or the new error message format.
2. Modifying the `__repr__` method in the `MeasurementType` class in `classical_data.py` to correctly represent the enum value.

These changes ensure that the tests pass for both Python 3.11 and earlier versions.
@navaro1 navaro1 requested review from a team, vtomole and cduck as code owners July 5, 2023 08:50
Copy link
Collaborator

@tanujkhattar tanujkhattar left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the quickfix.

We should also add support for Python 3.11 now that the tests pass, but that can be a follow-up PR.

We can merge once the lint errors are fixed.

@CirqBot CirqBot added the size: M 50< lines changed <250 label Jul 5, 2023
@pavoljuhas pavoljuhas enabled auto-merge (squash) July 7, 2023 01:07
@pavoljuhas pavoljuhas merged commit 9dff011 into quantumlib:master Jul 7, 2023
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: M 50< lines changed <250
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants