8000 MAINT: revert adding `distutils` and `array_api` to `np.__all__` by rgommers · Pull Request #24427 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

MAINT: revert adding distutils and array_api to np.__all__ #24427

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 1 commit into from
Aug 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions numpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,15 @@
asmatrix, bmat, mat, matrix
)

# public submodules are imported lazily,
# therefore are accessible from __getattr__
# public submodules are imported lazily, therefore are accessible from
# __getattr__. Note that `distutils` (deprecated) and `array_api`
# (experimental label) are not added here, because `from numpy import *`
# must not raise any warnings - that's too disruptive.
__numpy_submodules__ = {
"linalg", "fft", "dtypes", "random", "polynomial", "ma",
"exceptions", "lib", "ctypeslib", "testing", "typing",
"array_api", "f2py", "test"
"f2py", "test"
}
if sys.version_info < (3, 12):
__numpy_submodules__.add('distutils')

# We build warning messages for former attributes
_msg = (
Expand Down Expand Up @@ -357,7 +357,7 @@ def __dir__():
)
public_symbols -= {
"core", "matrixlib", "matlib", "tests", "conftest", "version",
"compat"
"compat", "distutils", "array_api"
}
return list(public_symbols)

Expand Down
0