From fa8bec76e7fe38f1e99c70094b6db099f32dce31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Freitag?= Date: Sat, 7 Nov 2020 11:21:34 +0100 Subject: [PATCH] Drop Python 3.4 compatibility code Python 3.4 support was dropped in Sphinx 2.0. --- sphinx/util/inspect.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sphinx/util/inspect.py b/sphinx/util/inspect.py index f2cd8070b..66eac1c61 100644 --- a/sphinx/util/inspect.py +++ b/sphinx/util/inspect.py @@ -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)