summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
diff options
context:
space:
mode:
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