From f5db70ad3b3fbeccc12ee0fdcd3844c9e6e77799 2024-12-11 09:29:47 From: M Bussonnier Date: 2024-12-11 09:29:47 Subject: [PATCH] Remove IPython/utils/ulinecache.py deprecated since IPython 6 (#14611) --- diff --git a/IPython/utils/ulinecache.py b/IPython/utils/ulinecache.py deleted file mode 100644 index 0b4ede0..0000000 --- a/IPython/utils/ulinecache.py +++ /dev/null @@ -1,21 +0,0 @@ -""" -This module has been deprecated since IPython 6.0. - -Wrapper around linecache which decodes files to unicode according to PEP 263. -""" -import functools -import linecache -from warnings import warn - -getline = linecache.getline - -# getlines has to be looked up at runtime, because doctests monkeypatch it. -@functools.wraps(linecache.getlines) -def getlines(filename, module_globals=None): - """ - Deprecated since IPython 6.0 - """ - warn(("`IPython.utils.ulinecache.getlines` is deprecated since" - " IPython 6.0 and will be removed in future versions."), - DeprecationWarning, stacklevel=2) - return linecache.getlines(filename, module_globals=module_globals) diff --git a/pyproject.toml b/pyproject.toml index 086f4f2..3f8aaf3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -299,7 +299,6 @@ module = [ "IPython.utils.terminal", "IPython.utils.timing", "IPython.utils.tokenutil", - "IPython.utils.ulinecache", "IPython.utils.version", "IPython.utils.wildcard",