Skip to content
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

REV,BUG: Replace NotImplemented with typing.Any #19311

Merged
merged 1 commit into from Jun 23, 2021

Conversation

BvB93
Copy link
Member

@BvB93 BvB93 commented Jun 23, 2021

Partial backport of #19176.
Closes #19310.

Replace all NotImplemented-based runtime placeholders with typing.Any. The problem with the previous
approach is that typing lacks the necessary special-casing for NotImplemented, and will thus raise an exception
when used with subscriptable typing constructs (e.g. Union).

Note that the relevant issue is limited to python 3.7 installations that lack the typing-extensions package.

@BvB93 BvB93 linked an issue Jun 23, 2021 that may be closed by this pull request
@BvB93 BvB93 added this to the 1.21.1 release milestone Jun 23, 2021
@github-actions github-actions bot added the 34 - Reversion Reversion of previous commit or merge label Jun 23, 2021
@charris charris merged commit 209cca9 into numpy:maintenance/1.21.x Jun 23, 2021
@charris
Copy link
Member

charris commented Jun 23, 2021

Thanks Bas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
08 - Backport Used to tag backport PRs 34 - Reversion Reversion of previous commit or merge Static typing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

numpy 1.21 generates issue with importing xarray
2 participants