https://github.com/python/cpython/commit/9dacf430c2f4af2acd870291a649b7b957efcd2c
commit: 9dacf430c2f4af2acd870291a649b7b957efcd2c
branch: main
author: sobolevn <[email protected]>
committer: sobolevn <[email protected]>
date: 2024-09-14T16:14:45+03:00
summary:
Remove unused `_allowed_types` from `typing.py` (#124090)
files:
M Lib/typing.py
diff --git a/Lib/typing.py b/Lib/typing.py
index bcb7bec23a9aa1..9377e771d60f4b 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -29,7 +29,7 @@
import operator
import sys
import types
-from types import WrapperDescriptorType, MethodWrapperType,
MethodDescriptorType, GenericAlias
+from types import GenericAlias
from _typing import (
_idfunc,
@@ -2352,11 +2352,6 @@ def greet(name: str) -> None:
return val
-_allowed_types = (types.FunctionType, types.BuiltinFunctionType,
- types.MethodType, types.ModuleType,
- WrapperDescriptorType, MethodWrapperType,
MethodDescriptorType)
-
-
def get_type_hints(obj, globalns=None, localns=None, include_extras=False,
*, format=annotationlib.Format.VALUE):
"""Return type hints for an object.
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]