Skip to content

Conversation

@charris
Copy link
Member

@charris charris commented Sep 26, 2021

Backport of #19856.

Closes #19834

numpy.typing currently has a number of (type-check-only) ufunc subclasses that are used for differentiation the various combinations of ufunc.nin and ufunc.nout ufuncs. These classes were previously marked as Any during runtime however, which could trip up autocompletion tools such as Jedi.

This issue has been resolved by instead treating them as ufunc aliases during runtime, similar to how typing.TypedDict is treated w.r.t. dict.

@charris
Copy link
Member Author

charris commented Sep 26, 2021

@BvB93 Ping for check. NumPy 1.21.x still supports Python 3.7.

@charris charris added this to the 1.21.3 release milestone Sep 26, 2021
Copy link
Member

@BvB93 BvB93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, the changes introduced herein work just as well with 3.7 as with >= 3.8.

@charris charris merged commit 51b7c50 into numpy:maintenance/1.21.x Sep 26, 2021
@charris charris deleted the backport-19856 branch September 26, 2021 14:23
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.

2 participants