Skip to content

Commit

Permalink
Merge pull request #8382 from francoisfreitag/34
Browse files Browse the repository at this point in the history
Drop Python 3.4 compatibility code
  • Loading branch information
tk0miya committed Nov 8, 2020
2 parents a38ba86 + fa8bec7 commit bca35cd
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions sphinx/util/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ def getargspec(func: Callable) -> Any:
methods."""
warnings.warn('sphinx.ext.inspect.getargspec() is deprecated',
RemovedInSphinx50Warning, stacklevel=2)
# On 3.5+, signature(int) or similar raises ValueError. On 3.4, it
# succeeds with a bogus signature. We want a TypeError uniformly, to
# match historical behavior.
if (isinstance(func, type) and
is_builtin_class_method(func, "__new__") and
is_builtin_class_method(func, "__init__")):
raise TypeError(
"can't compute signature for built-in type {}".format(func))

sig = inspect.signature(func)

Expand Down

0 comments on commit bca35cd

Please sign in to comment.