summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2020-08-20 08:34:16 -0500
committerGitHub <noreply@github.com>2020-08-20 08:34:16 -0500
commit2810becf98e20bfe2bf99311c5f4f3e150d12d09 (patch)
treea36ae97b175f968f51d1c6b22d4a6da0dbbceb83
parenteaa59b4f04a0c75091e332afa95a304eddcd93ab (diff)
parentcaa70eac1a5118f0de861f6898c52ac2e91dc803 (diff)
downloadnumpy-2810becf98e20bfe2bf99311c5f4f3e150d12d09.tar.gz
Merge pull request #17116 from eric-wieser/expire-ctypes_load_library
API: Remove `np.ctypeslib.ctypes_load_library`
-rw-r--r--doc/release/upcoming_changes/17116.expired.rst2
-rw-r--r--doc/source/reference/routines.ctypeslib.rst1
-rw-r--r--numpy/ctypeslib.py8
3 files changed, 4 insertions, 7 deletions
diff --git a/doc/release/upcoming_changes/17116.expired.rst b/doc/release/upcoming_changes/17116.expired.rst
new file mode 100644
index 000000000..d8a3a43d5
--- /dev/null
+++ b/doc/release/upcoming_changes/17116.expired.rst
@@ -0,0 +1,2 @@
+* The 14-year deprecation of ``np.ctypeslib.ctypes_load_library`` is expired.
+ Use :func:`~numpy.ctypeslib.load_library` instead, which is identical.
diff --git a/doc/source/reference/routines.ctypeslib.rst b/doc/source/reference/routines.ctypeslib.rst
index 562638e9c..3a059f5d9 100644
--- a/doc/source/reference/routines.ctypeslib.rst
+++ b/doc/source/reference/routines.ctypeslib.rst
@@ -9,6 +9,5 @@ C-Types Foreign Function Interface (:mod:`numpy.ctypeslib`)
.. autofunction:: as_array
.. autofunction:: as_ctypes
.. autofunction:: as_ctypes_type
-.. autofunction:: ctypes_load_library
.. autofunction:: load_library
.. autofunction:: ndpointer
diff --git a/numpy/ctypeslib.py b/numpy/ctypeslib.py
index 76ba838b7..e8f7750fe 100644
--- a/numpy/ctypeslib.py
+++ b/numpy/ctypeslib.py
@@ -49,12 +49,11 @@ Then, we're ready to call ``foo_func``:
>>> _lib.foo_func(out, len(out)) #doctest: +SKIP
"""
-__all__ = ['load_library', 'ndpointer', 'ctypes_load_library',
- 'c_intp', 'as_ctypes', 'as_array']
+__all__ = ['load_library', 'ndpointer', 'c_intp', 'as_ctypes', 'as_array']
import os
from numpy import (
- integer, ndarray, dtype as _dtype, deprecate, array, frombuffer
+ integer, ndarray, dtype as _dtype, array, frombuffer
)
from numpy.core.multiarray import _flagdict, flagsobj
@@ -75,7 +74,6 @@ if ctypes is None:
"""
raise ImportError("ctypes is not available.")
- ctypes_load_library = _dummy
load_library = _dummy
as_ctypes = _dummy
as_array = _dummy
@@ -154,8 +152,6 @@ else:
## if no successful return in the libname_ext loop:
raise OSError("no file with expected extension")
- ctypes_load_library = deprecate(load_library, 'ctypes_load_library',
- 'load_library')
def _num_fromflags(flaglist):
num = 0