-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
regression in py38 with bool-as-index deprecation warning #14397
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
Comments
This looks like a cpython bug, i'd expect them to call |
Hmmpf, as much as I like that they use For now my gut feeling is to agree with Eric and think that python should probably leave bool coercion unsafe, its not like this also forbids |
It is a bit strange anyway? If they change |
We see this in Matplotlib rebuilds for Python 3.8 on Fedora Rawhide, as it is triggering failures in tests that expect a certain number of warnings. |
I think we should report this upstream, preferably with a non-numpy repro |
From the Matpltolib side, I put in matplotlib/matplotlib#15168 I will leave the discussion on https://bugs.python.org/issue37980 to numpy and core developers. |
Also creating failures in scikit-learn (as we expect no deprecation warnings in our own code). |
Stumbled on this, should we just back down for now (it would be nice to do this, because we reject our bools as integers in many places and have to do so)? Python 3.10 at least still doesn't like it, and while I think it is a Python problem at the core, I don't see how they can fix it easily. |
Also reported upstream at https://bugs.python.org/issue37980
With numpy 1.17.1 and python37 the following does not warn
but with py38
This bisects to python/cpython#11952 which use
__index__
in more places which is tripping the deprecation in a surprising place.Works in all cases.
The text was updated successfully, but these errors were encountered: