diff options
author | Matti Picus <matti.picus@gmail.com> | 2021-11-19 14:51:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-19 07:51:36 -0500 |
commit | 46ec71f6bc74a0a248036b305fade5562e396c52 (patch) | |
tree | fbcdee4e3a86f8fcdfbee6269218fff01826a8c6 /numpy/compat | |
parent | 3774a620f79c069173d2567f09a9760f8ba0d564 (diff) | |
download | numpy-46ec71f6bc74a0a248036b305fade5562e396c52.tar.gz |
ENH: provide a convenience function to replace npy_load_module (#20395)
`load_module` is deprecated since python 3.4 and will be removed in python 3.12.
Use `exec_module` instead. Provide a convenience function in `distutils.misc_utils`
instead of `npy_load_module` from `compat.py3k`.
Diffstat (limited to 'numpy/compat')
-rw-r--r-- | numpy/compat/py3k.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/compat/py3k.py b/numpy/compat/py3k.py index 1fa17621a..3d10bb988 100644 --- a/numpy/compat/py3k.py +++ b/numpy/compat/py3k.py @@ -107,7 +107,9 @@ class contextlib_nullcontext: def npy_load_module(name, fn, info=None): """ - Load a module. + Load a module. Uses ``load_module`` which will be deprecated in python + 3.12. An alternative that uses ``exec_module`` is in + numpy.distutils.misc_util.exec_mod_from_location .. versionadded:: 1.11.2 |