Skip to content

TST: Bump the python 3.10 test version from beta4 to rc1 #19612

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

Merged
merged 4 commits into from
Aug 6, 2021

Conversation

BvB93
Copy link
Member

@BvB93 BvB93 commented Aug 4, 2021

Use the new python 3.10rc1 release for testing.

@charris
Copy link
Member

charris commented Aug 4, 2021

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

@seberg
Copy link
Member

seberg commented Aug 4, 2021

Honestly, the complex thing looks like a python bug when fixing something that was mostly fine probably: https://bugs.python.org/issue44698 I will comment, there.

@seberg
Copy link
Member

seberg commented Aug 4, 2021

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
Copy link
Member

seberg commented Aug 4, 2021

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

@BvB93
Copy link
Member Author

BvB93 commented Aug 4, 2021

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
Copy link
Member Author

BvB93 commented Aug 4, 2021

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
Copy link
Member

seberg commented Aug 4, 2021

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

@charris charris added the 09 - Backport-Candidate PRs tagged should be backported label Aug 5, 2021
@BvB93
Copy link
Member Author

BvB93 commented Aug 5, 2021

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
Copy link
Member

seberg commented Aug 5, 2021

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

BvB93 added 2 commits August 6, 2021 13:25
Broken in rc1 as of bpo-44524
Complex exponentiation is broken for `builtins.complex` as of bpo-44698
@charris charris merged commit 99eac42 into numpy:main Aug 6, 2021
@charris
Copy link
Member

charris commented Aug 6, 2021

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

@BvB93
Copy link
Member Author

BvB93 commented Aug 6, 2021

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.

@BvB93 BvB93 deleted the test branch August 6, 2021 13:36
charris pushed a commit to charris/numpy that referenced this pull request Aug 11, 2021
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Aug 11, 2021
charris pushed a commit to charris/numpy that referenced this pull request Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants