Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 85cf4ef

Browse files
committed
DEP: Remove np.pkgload, which was deprecated in 1.10
Attempts to use this on either cpython27 or cpython35, in either a shell or a script, gives: NameError: name '__path__' is not defined Perhaps I'm calling it wrong, but it might just be broken.
1 parent 8e892d4 commit 85cf4ef

File tree

3 files changed

+7
-361
lines changed

3 files changed

+7
-361
lines changed

doc/release/1.16.0-notes.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ The type dictionaries `numpy.core.typeNA` and `numpy.core.sctypeNA` were buggy
2121
and not documented. They will be removed in the 1.18 release. Use
2222
`numpy.sctypeDict` instead.
2323

24+
25+
``np.PackageLoader`` and ``np.pkgload`` have been removed
26+
---------------------------------------------------------
27+
These were deprecated in 1.10, had no tests, and seem to no longer work in
28+
1.15 anyway.
29+
2430
Future Changes
2531
==============
2632

numpy/__init__.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,9 @@
133133
from .version import git_revision as __git_revision__
134134
from .version import version as __version__
135135

136-
from ._import_tools import PackageLoader
137-
138-
def pkgload(*packages, **options):
139-
loader = PackageLoader(infunc=True)
140-
return loader(*packages, **options)
141-
142136
__all__ = ['ModuleDeprecationWarning',
143137
'VisibleDeprecationWarning']
144138

145-
pkgload.__doc__ = PackageLoader.__call__.__doc__
146-
147139
# Allow distributors to run custom init code
148140
from . import _distributor_init
149141

@@ -172,8 +164,7 @@ def pkgload(*packages, **options):
172164

173165
from .core import round, abs, max, min
174166

175-
__all__.extend(['__version__', 'pkgload', 'PackageLoader',
176-
'show_config'])
167+
__all__.extend(['__version__', 'show_config'])
177168
__all__.extend(core.__all__)
178169
__all__.extend(_mat.__all__)
179170
__all__.extend(lib.__all__)

numpy/_import_tools.py

Lines changed: 0 additions & 351 deletions
This file was deleted.

0 commit comments

Comments
 (0)