Skip to content

TYP: Deprecate calling numpy.save with fix_imports (PEP 702)#27207

Merged
rgommers merged 1 commit intonumpy:mainfrom
jorenham:typing/deprecate-save-fix_imports
Aug 14, 2024
Merged

TYP: Deprecate calling numpy.save with fix_imports (PEP 702)#27207
rgommers merged 1 commit intonumpy:mainfrom
jorenham:typing/deprecate-save-fix_imports

Conversation

@jorenham
Copy link
Copy Markdown
Member

@jorenham jorenham commented Aug 13, 2024

IDE's such as VSCode (+Pylance) will provide a helpful message when attempting to pass fix_imports to numpy.save:
image

But mypy currently doesn't support PEP 702: python/mypy#16111.


Fun coincidence: the PR number contains only the digits 7, 0, and 2 🙃

Copy link
Copy Markdown
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

Seems like a good idea to me, thanks @jorenham. The gain of using @deprecated probably outweighs not being able to test this indeed. In it goes.

@rgommers rgommers merged commit 0834d68 into numpy:main Aug 14, 2024
@rgommers rgommers added this to the 2.2.0 release milestone Aug 14, 2024
@jorenham jorenham deleted the typing/deprecate-save-fix_imports branch August 14, 2024 17:37
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