Fix #884: use Python 3.11 in nightly Cirq pre-release compatibility test #885
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Python
typing
package changed in at least one respect between Python 3.10 and 3.11: in 3.10, it did not have the symbolSelf
). Cirq 1.6+ assumes that theSelf
is defined by importingtyping
, and fails in Python 3.10. This leads to the error seen in the CI runshttps://github.com/tensorflow/quantum/actions/runs/17288698138/job/49070859286
Since Cirq 1.6 requires Python 3.11 anyway, this workflow (for testing against the Cirq pre-release) should probably use 3.11. Doing so avoids the problem.
An additional change in this PR is to make this workflow trigger on pushes that affect this workflow file, so that the results of edits to the workflow can be seen immediately during development.