Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Drop import of deprecated method
Browse files Browse the repository at this point in the history
The method inspect.getfullargspec was introduced in Python 3 as an
improvement over inspect.getargspec, however both were imported while we
still supported Python 2.

Now that we have dropped Python 2 support, we can assume that the method
inspect.getfullargspec exists.
  • Loading branch information
Pål Grønås Drange authored and markusdregi committed Nov 9, 2020
1 parent 0526e21 commit 1c8554c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions configsuite/extension/ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@

import os
import importlib

# The getargspec/getfullargspec should be dropped
# for the "signature" module when python2 is not supported
try:
from inspect import getfullargspec as inspect_method
except ImportError:
from inspect import getargspec as inspect_method
import inspect

from docutils.parsers.rst import Directive
from docutils.parsers.rst.directives import unchanged_required
Expand Down Expand Up @@ -187,7 +181,7 @@ def run(self):
)
raise self.error(err_msg.format(func_name=func_str))

insp = inspect_method(schema_func) # pylint: disable=deprecated-method
insp = inspect.getfullargspec(schema_func)
if len(insp.args) != 0:
err_msg = (
"The module.function given at Configsuite :module: "
Expand Down

0 comments on commit 1c8554c

Please sign in to comment.