summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-05-21 03:07:02 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-05-21 03:07:02 (GMT)
commit57c74fca025ccd80d9d5f7da2d296c30e34dfec9 (patch)
tree9f113dbe5209f1be7fca4d6aa0c32cfd91a2075d /Lib/inspect.py
parent45d61561541b35d9c8757b9cc87974edc73f8649 (diff)
downloadcpython-57c74fca025ccd80d9d5f7da2d296c30e34dfec9.zip
cpython-57c74fca025ccd80d9d5f7da2d296c30e34dfec9.tar.gz
cpython-57c74fca025ccd80d9d5f7da2d296c30e34dfec9.tar.bz2
Issue 24248: Deprecate inspect.Signature.from_function and .from_builtin
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index 1e37fed..d17a498 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -2661,11 +2661,17 @@ class Signature:
@classmethod
def from_function(cls, func):
"""Constructs Signature for the given python function."""
+
+ warnings.warn("inspect.Signature.from_function() is deprecated, "
+ "use Signature.from_callable()", DeprecationWarning)
return _signature_from_function(cls, func)
@classmethod
def from_builtin(cls, func):
"""Constructs Signature for the given builtin function."""
+
+ warnings.warn("inspect.Signature.from_builtin() is deprecated, "
+ "use Signature.from_callable()", DeprecationWarning)
return _signature_from_builtin(cls, func)
@classmethod