Skip to content

Conversation

@anikchand461
Copy link
Contributor

Post-2.0 cleanup: Remove deprecated shims and add release note.

Changes:

  • Delete numpy/linalg/linalg.py
  • Delete numpy/fft/helpers.py
  • Add release note: doc/release/upcoming/29000.expiring.rst (placeholder; update to PR # post-creation)

No breaking changes—public APIs (e.g., np.linalg.inv, np.fft.fft) unchanged. CI will verify tests.

Bundle per @mattip's guidance in #28983. Closes #28983.

@jorenham
Copy link
Member

jorenham commented Oct 9, 2025

I'm only seeing a release note. Did you forget to push the deletions?

@anikchand461
Copy link
Contributor Author

anikchand461 commented Oct 9, 2025

sorry ... I think there is an issue

edit : Please check now

@jorenham
Copy link
Member

jorenham commented Oct 9, 2025

The .pyi also have to be removed

@anikchand461
Copy link
Contributor Author

now check

Copy link
Member

@jorenham jorenham left a comment

Choose a reason for hiding this comment

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

in numpy/linalg/__init__.pyi there's still a re-export of .linalg that should go

@anikchand461
Copy link
Contributor Author

anikchand461 commented Oct 9, 2025

ok I have removed init.pyi from both linalg and helpers

@jorenham
Copy link
Member

jorenham commented Oct 9, 2025

Ehh, the __init__.pyi should stay... It was just the re-export I was talking about:

in numpy/linalg/__init__.pyi there's still a re-export of .linalg that should go

@anikchand461
Copy link
Contributor Author

anikchand461 commented Oct 10, 2025

I have restored the fft/init.pyi and updated the linalg/init.pyi

please check .. and if further enhancements required there please infrom me .

Previously deprecated, use :mod:`numpy.linalg` instead.

* :mod:`numpy.fft.helpers`
Previously deprecated, use :mod:`numpy.fft` instead. No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

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

This is actually PR 29909, not 29000.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what I have to do now ?

Copy link
Member

Choose a reason for hiding this comment

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

$ git mv doc/release/upcoming_changes/29000.expiring.rst doc/release/upcoming_changes/29909.expiring.rst
$ git commit -m"correct release note name"
$ git push

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have changed ... please check

Copy link
Member

Choose a reason for hiding this comment

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

Almost. It is PR 29909 not 29009, and the name needs to be expired not expiring

@jorenham jorenham requested a review from Copilot October 10, 2025 11:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR finalizes the deprecation of two NumPy modules by removing the deprecated shim modules numpy.linalg.linalg and numpy.fft.helpers, replacing them with empty files. The public APIs remain unchanged as all functions are still available through their proper modules (numpy.linalg and numpy.fft).

  • Removed deprecated shim modules that were redirecting to private implementations
  • Added release notes documenting the removal of these deprecated features
  • Updated type stub files to reflect the module removals

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
numpy/linalg/linalg.py Removed deprecated shim module, replaced with empty file
numpy/linalg/linalg.pyi Removed type stubs for deprecated module
numpy/linalg/init.pyi Removed import reference to deprecated linalg module
numpy/fft/helper.py Removed deprecated shim module, replaced with empty file
numpy/fft/helper.pyi Removed type stubs for deprecated module
doc/release/upcoming_changes/29009.expiring.rst Added release notes documenting the removal

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@mattip
Copy link
Member

mattip commented Oct 10, 2025

General CI was passing, so I added a commit that I hope fixes doc building while skipping the rest of CI.

@anikchand461
Copy link
Contributor Author

thanks @mattip

@anikchand461
Copy link
Contributor Author

please merge the pull request

@mattip
Copy link
Member

mattip commented Oct 10, 2025

Here is the rendered release note.

@jorenham
Copy link
Member

jorenham commented Oct 10, 2025

Here is the rendered release note.

Usually release notes like this one go under the Expired deprecations heading, right? For example: https://numpy.org/doc/stable/release/2.3.0-notes.html#expired-deprecations

@anikchand461
Copy link
Contributor Author

Here is the rendered release note.

what have to do now ? @mattip

@mattip
Copy link
Member

mattip commented Oct 11, 2025

@jorenham I see it under the Expired section, no?

@jorenham
Copy link
Member

@jorenham I see it under the Expired section, no?

Oh woops brainfart

@mattip mattip merged commit d6c6292 into numpy:main Oct 11, 2025
4 checks passed
@mattip
Copy link
Member

mattip commented Oct 11, 2025

Thanks @anikchand461

@anikchand461
Copy link
Contributor Author

Thanks for merging the PR @mattip

jorenham added a commit to jorenham/numpy that referenced this pull request Oct 15, 2025
IndifferentArea pushed a commit to IndifferentArea/numpy that referenced this pull request Dec 7, 2025
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