Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DEP: finalize removal of numpy.compat #28961

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 3 commits into from
May 14, 2025
Merged

DEP: finalize removal of numpy.compat #28961

merged 3 commits into from
May 14, 2025

Conversation

jorenham
Copy link
Member

Since NumPy 2.0 it couldn't be used anymore:

>>> import numpy as np
>>> np.compat
Traceback (most recent call last):
  File "<python-input-3>", line 1, in <module>
    np.compat
  File "/home/joren/.pyenv/versions/3.13.3/lib/python3.13/site-packages/numpy/__init__.py", line 399, in __getattr__
    raise AttributeError(
    ...<3 lines>...
    )
AttributeError: `np.compat` was removed in the NumPy 2.0 release. There's no replacement, as Python 2 is no longer supported.

I'm not sure why it still existed, but now that we're approaching 2.3, I figured that we might as well get rid of it completely.

@charris
Copy link
Member

charris commented May 14, 2025

Could use a release note.

@jorenham jorenham added the 56 - Needs Release Note. Needs an entry in doc/release/upcoming_changes label May 14, 2025
@jorenham jorenham removed the 56 - Needs Release Note. Needs an entry in doc/release/upcoming_changes label May 14, 2025
Copy link
Member

@seberg seberg left a comment

Choose a reason for hiding this comment

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

Heh, fun. from numpy import compat was still working. Either way, the deprecation warning on it exists for long enough, so I agree with just getting rid of it. Thanks!

EDIT: Please don't hesitate to merge once tests pass.

@seberg seberg changed the title MAINT: remove numpy.compat DEP: finalize removal of numpy.compat May 14, 2025
@charris charris merged commit 1a3018a into numpy:main May 14, 2025
76 checks passed
@charris
Copy link
Member

charris commented May 14, 2025

Thanks Joren.

@jorenham jorenham deleted the np.compat branch May 14, 2025 17:00
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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.