Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion pluggy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ def varnames(func):
return ()

try: # func MUST be a function or method here or we won't parse any args
spec = inspect.getargspec(func)
spec = _getargspec(func)
except TypeError:
return (), ()

Expand Down Expand Up @@ -662,6 +662,14 @@ def __init__(self, plugin, plugin_name, function, hook_impl_opts):
self.__dict__.update(hook_impl_opts)


if hasattr(inspect, 'getfullargspec'):
def _getargspec(func):
return inspect.getfullargspec(func)
else:
def _getargspec(func):
return inspect.getargspec(func)


if hasattr(inspect, 'signature'):
def _formatdef(func):
return "%s%s" % (
Expand Down
2 changes: 0 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ addopts=-rxsX
norecursedirs=.tox ja .hg .env*
filterwarnings =
error
# inspect.getargspec() ignored, should be fixed in #81
ignore:inspect.getargspec().*deprecated

[flake8]
max-line-length=99