Skip to content

Commit

Permalink
Switch from inspect.getargspec to inspect.getfullargspec
Browse files Browse the repository at this point in the history
inspect.getargspec has been deprecated since 3.0
  • Loading branch information
domdfcoding committed Jan 28, 2022
1 parent a7983fe commit 8245a74
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions cherrypy/_cpdispatch.py
Expand Up @@ -206,12 +206,8 @@ def test_callable_spec(callable, callable_args, callable_kwargs):
def test_callable_spec(callable, args, kwargs): # noqa: F811
return None
else:
getargspec = inspect.getargspec
# Python 3 requires using getfullargspec if
# keyword-only arguments are present
if hasattr(inspect, 'getfullargspec'):
def getargspec(callable):
return inspect.getfullargspec(callable)[:4]
def getargspec(callable):
return inspect.getfullargspec(callable)[:4]


class LateParamPageHandler(PageHandler):
Expand Down

0 comments on commit 8245a74

Please sign in to comment.