[Python-modules-commits] [python-pyramid] 01/03: Port from upstream git, the workaround for inspect.getargspec() being deprecated in Python 3.5.

Barry Warsaw barry at moszumanska.debian.org
Fri Oct 30 15:24:51 UTC 2015


This is an automated email from the git hooks/post-receive script.

barry pushed a commit to branch master
in repository python-pyramid.

commit c7bd38b865aee709dfa4410a420a61a97c3bf763
Author: Barry Warsaw <barry at python.org>
Date:   Fri Oct 30 11:13:12 2015 -0400

    Port from upstream git, the workaround for inspect.getargspec() being
    deprecated in Python 3.5.
    
    Patch-Name: getargspec-is-deprecated.patch
---
 pyramid/compat.py      | 5 +++++
 pyramid/config/util.py | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/pyramid/compat.py b/pyramid/compat.py
index bfa345b..e2b5bb5 100644
--- a/pyramid/compat.py
+++ b/pyramid/compat.py
@@ -211,6 +211,11 @@ try: # pragma: no cover
 except NameError: # pragma: no cover
     input_ = input
 
+if PY3:
+    from inspect import getfullargspec as getargspec
+else:
+    from inspect import getargspec
+
 
 try: 
     from StringIO import StringIO as NativeIO
diff --git a/pyramid/config/util.py b/pyramid/config/util.py
index 8925921..23cdc6b 100644
--- a/pyramid/config/util.py
+++ b/pyramid/config/util.py
@@ -3,6 +3,7 @@ import inspect
 
 from pyramid.compat import (
     bytes_,
+    getargspec,
     is_nonstr_iter,
     )
 
@@ -201,7 +202,7 @@ def takes_one_arg(callee, attr=None, argname=None):
             return False
 
     try:
-        argspec = inspect.getargspec(fn)
+        argspec = getargspec(fn)
     except TypeError:
         return False
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-pyramid.git



More information about the Python-modules-commits mailing list