TST: Bump the python 3.10 test version from beta4 to rc1 by BvB93 · Pull Request #19612 · numpy/numpy

@BvB93

Use the new python 3.10rc1 release for testing.

@BvB93

The class got renamed in the 3.10rc1 release

@charris

Well, that's unfortunate. I wouldn't have expected much change between b4 and rc1.

@seberg

@seberg

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.

@seberg

I guess we should just hard-code the expected values there. @BvB93 do you think typing __name__ change is expected?

@BvB93

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.

@BvB93

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

@seberg

@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...

@BvB93

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?

@seberg

@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.

Broken in rc1 as of bpo-44524
Complex exponentiation is broken for `builtins.complex` as of bpo-44698

@charris

Thanks Bas. I'm a bit concerned that we make sure to enable the lookfor test when (probably) rc2 comes out.

@BvB93

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.

charris pushed a commit to charris/numpy that referenced this pull request

Aug 11, 2021

charris pushed a commit to charris/numpy that referenced this pull request

Aug 11, 2021