TST: Bump the python 3.10 test version from beta4 to rc1 by BvB93 · Pull Request #19612 · numpy/numpy
Hmmm, first thought the "overflow" error came directly from the Python change. But it may be that the error is just the right thing to do, and the subtle change causes it to show up now.
I guess we should just hard-code the expected values there. @BvB93 do you think typing __name__ change is expected?
I guess we should just hard-code the expected values there. @BvB93 do you think typing
__name__change is expected?
It isn't; ?typing.Union doesn't even have a __name__ attribute, so how exactly did we end up with __name__ = None
EDIT: scratch that, a Union.__name__ attribute was added.
It seems there is a bug with the typing._SpecialForm.__name__ implementation of python/cpython#27237.
It works fine for a bare Union, but for others the __name__ returns nonsense.
In [1]: from typing import Union In [2]: print(Union.__name__) Union In [3]: print(Union[int].__name__) int In [4]: print(Union[int, float].__name__) None
@BvB93 can you make sure the None return is intentional in Python? So long it isn't backported to 3.9 or so, we could just adapt to it...
After some discussion in https://bugs.python.org/issue44524 there seems to be an agreement that the whole __name__ is None thing is a bug, so I'd suggest we just skip the the problematic test for 3.10rc1.
@seberg what's the best course of action here for the complex-related failures?
Do you know if we can ignore the error for now, or will this require changes from our side?
@BvB93 it sounds like Python will revert this for 3.10 (and actually apparently also 3.9). If we want to make CI pass, I think we can just hardcode the expected values and trust Python to add a regression test when they fix it.
Thanks Bas. I'm a bit concerned that we make sure to enable the lookfor test when (probably) rc2 comes out.
Thanks Bas. I'm a bit concerned that we make sure to enable the lookfor test when (probably) rc2 comes out.
The lookfor test is currently disabled exclusively for rc1, so it should run as usual once we switch to rc2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters