summaryrefslogtreecommitdiffstats
path: root/contrib/python/ipython/py3/IPython/utils/version.py
diff options
context:
space:
mode:
authorrobot-contrib <[email protected]>2022-05-18 00:43:36 +0300
committerrobot-contrib <[email protected]>2022-05-18 00:43:36 +0300
commit9e5f436a8b2a27bcc7802e443ea3ef3e41a82a75 (patch)
tree78b522cab9f76336e62064d4d8ff7c897659b20e /contrib/python/ipython/py3/IPython/utils/version.py
parent8113a823ffca6451bb5ff8f0334560885a939a24 (diff)
Update contrib/python/ipython/py3 to 8.3.0
ref:e84342d4d30476f9148137f37fd0c6405fd36f55
Diffstat (limited to 'contrib/python/ipython/py3/IPython/utils/version.py')
-rw-r--r--contrib/python/ipython/py3/IPython/utils/version.py21
1 files changed, 14 insertions, 7 deletions
diff --git a/contrib/python/ipython/py3/IPython/utils/version.py b/contrib/python/ipython/py3/IPython/utils/version.py
index 1de0047e6b4..8c65c78e15e 100644
--- a/contrib/python/ipython/py3/IPython/utils/version.py
+++ b/contrib/python/ipython/py3/IPython/utils/version.py
@@ -12,15 +12,13 @@ It is a bit ridiculous that we need these.
# the file COPYING, distributed as part of this software.
#-----------------------------------------------------------------------------
-#-----------------------------------------------------------------------------
-# Imports
-#-----------------------------------------------------------------------------
+from warnings import warn
-from distutils.version import LooseVersion
+warn(
+ "The `IPython.utils.version` module has been deprecated since IPython 8.0.",
+ DeprecationWarning,
+)
-#-----------------------------------------------------------------------------
-# Code
-#-----------------------------------------------------------------------------
def check_version(v, check):
"""check version string v >= check
@@ -29,6 +27,15 @@ def check_version(v, check):
it is assumed that the dependency is satisfied.
Users on dev branches are responsible for keeping their own packages up to date.
"""
+ warn(
+ "`check_version` function is deprecated as of IPython 8.0"
+ "and will be removed in future versions.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
+
+ from distutils.version import LooseVersion
+
try:
return LooseVersion(v) >= LooseVersion(check)
except TypeError: