-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Numpy 1.24 breaks master. #5967
Comments
Another source of conflict is that numba (a Cirq dependency due to cirq-contrib) supports numpy only upto 1.23; so we are blocked on them before we can upgrade to 1.24. See https://numba.readthedocs.io/en/stable/user/installing.html#compatibility For now, I will limit numpy version to 1.23 and then we can work on the upgrade once numba adds support for 1.24. |
Keep numpy version in the isolated Python environment at 1.23 as numpy-1.24 is incompatible with cirq and numba. Fixes stuck notebook tests which import numba. Related to quantumlib#5967
Keep numpy version in the isolated Python environment at 1.23 as numpy-1.24 is incompatible with cirq and numba. Fixes stuck notebook tests which import numba. Related to #5967
can we add a comment to the requirements.txt linking to this issue so it's clear why we're restricting the version |
Is anyone assigned to this high priority issue? |
I think this should be unblocked by #5991 and a new release of numba that now supports numpy 1.24 (https://numba.readthedocs.io/en/stable/user/installing.html#compatibility) |
sweeeet! Regardless of what numba is doing, we can un-pin it in our dependencies, yes? |
I think so, let's find out - #6149 |
Is there a plan to release soon with numpy 1.24 support? |
- remove numpy version pinning, but require major version 1 - remove warning filters not relevant after numpy-1.24 Follow up to quantumlib#5967
- remove numpy version pinning, but require major version 1 - remove warning filters not relevant after numpy-1.24 Follow up to #5967
- remove numpy version pinning, but require major version 1 - remove warning filters not relevant after numpy-1.24 Follow up to quantumlib#5967
Description of the issue
Numpy 1.24 was released recently (see release notes) and it breaks master branch.
Using alias for built-in types was deprecated in Numpy 1.20 (See https://numpy.org/doc/stable/release/1.20.0-notes.html#using-the-aliases-of-builtin-types-like-np-int-is-deprecated) and was finally removed in the 1.24 release. As a result, all cirq code that uses aliases for built-in types like
np.bool
breaks.Specifically, we'd need to fix the the
proper_repr
function to usebool
instead ofnp.bool
, which would end up changing therepr
of a bunch a Cirq classes.Cirq/cirq-core/cirq/_compat.py
Line 143 in db33aad
Other occurrences of
np.bool
are inrepr
andrepr_inward
files, which can be updated directly to usebool
instead ofnp.bool
. Specifically, the following two files:Cirq/cirq-google/cirq_google/json_test_data/cirq.google.EngineResult.repr
Line 1 in db33aad
Cirq/cirq-core/cirq/protocols/json_test_data/TrialResult.repr_inward
Line 1 in db33aad
Cirq version
The text was updated successfully, but these errors were encountered: