Skip to content

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

Merged
charris merged 1 commit intonumpy:maintenance/1.21.xfrom
BvB93:notimplemented
Jun 23, 2021
Merged

REV,BUG: Replace NotImplemented with typing.Any#19311
charris merged 1 commit intonumpy:maintenance/1.21.xfrom
BvB93:notimplemented

Conversation

@BvB93
Copy link
Copy Markdown
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
Copy Markdown
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 41 - 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