improvement: Add AST subclass constructors (#11880)

This commit is contained in:
bzoracler
2024-05-19 01:33:07 +12:00
committed by GitHub
parent 1230ced066
commit 5bd7150139
5 changed files with 684 additions and 21 deletions

View File

@@ -129,6 +129,11 @@ os.path.join
# Allowlist entries that cannot or should not be fixed
# ==========
# Runtime AST node runtime constructor behaviour is too loose.
# For static typing, the loose behaviour is undesirable (https://github.com/python/typeshed/issues/8378).
# For the runtime, the loose behaviour is deprecated in Python 3.13 (https://github.com/python/cpython/issues/105858)
_?ast.pattern.__init__
# Side effects from module initialization
_compat_pickle.excname
email.contentmanager.maintype

View File

@@ -74,6 +74,11 @@ os.path.join
# Allowlist entries that cannot or should not be fixed
# ==========
# Runtime AST node runtime constructor behaviour is too loose.
# For static typing, the loose behaviour is undesirable (https://github.com/python/typeshed/issues/8378).
# For the runtime, the loose behaviour is deprecated in Python 3.13 (https://github.com/python/cpython/issues/105858)
_?ast.pattern.__init__
_ast.ImportFrom.level # None on the class, but never None on instances
_collections_abc.AsyncGenerator.athrow # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also.
_weakref.ProxyType.__reversed__ # Doesn't really exist

View File

@@ -57,6 +57,12 @@ zoneinfo.ZoneInfo.from_file
# Allowlist entries that cannot or should not be fixed
# ==========
# Runtime AST node runtime constructor behaviour is too loose.
# For static typing, the loose behaviour is undesirable (https://github.com/python/typeshed/issues/8378).
# For the runtime, the loose behaviour is deprecated in Python 3.13 (https://github.com/python/cpython/issues/105858)
_?ast.pattern.__init__
_?ast.type_param.__init__
_ast.ImportFrom.level # None on the class, but never None on instances
_collections_abc.AsyncGenerator.athrow # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also.
_weakref.ProxyType.__reversed__ # Doesn't really exist

View File

@@ -322,6 +322,14 @@ _ctypes.call_function
# Allowlist entries that cannot or should not be fixed
# ==========
# Runtime AST node runtime constructor behaviour is too loose.
# For static typing, the loose behaviour is undesirable (https://github.com/python/typeshed/issues/8378).
# For the runtime, the loose behaviour is deprecated in Python 3.13 (https://github.com/python/cpython/issues/105858)
_?ast.AST.__init__
_?ast.excepthandler.__init__
_?ast.expr.__init__
_?ast.stmt.__init__
# async at runtime, deliberately not in the stub, see #7491
_collections_abc.AsyncGenerator.asend # pos-only differences also.
_collections_abc.AsyncGenerator.__anext__