mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Drop Python 3.4 compatibility code
Python 3.4 support was dropped in Sphinx 2.0.
This commit is contained in:
parent
a38ba8670a
commit
fa8bec76e7
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user