Skip to content

Commit 8f19658

Browse files
committed
Copy entries from old allowlists
1 parent 753cb3d commit 8f19658

4 files changed

Lines changed: 166 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# =======
2+
# >= 3.13
3+
# =======
4+
5+
(mmap.MAP_32BIT)? # Exists locally on MacOS but not on GitHub

stdlib/@tests/stubtest_allowlists/linux-py314.txt

Whitespace-only changes.
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
# =========================
2+
# New errors in Python 3.14
3+
# =========================
4+
5+
6+
# ====================================
7+
# Pre-existing errors from Python 3.13
8+
# ====================================
9+
10+
11+
# =======
12+
# >= 3.12
13+
# =======
14+
15+
zoneinfo.ZoneInfo.from_file # Pos-only parameters had different "names" in different Python versions
16+
17+
# Initialized at runtime
18+
typing_extensions.TypeAliasType.__parameters__
19+
typing_extensions.TypeAliasType.__value__
20+
21+
22+
# =======
23+
# >= 3.11
24+
# =======
25+
26+
enum.Enum.__init__
27+
typing.NewType.__mro_entries__
28+
29+
30+
# =======
31+
# >= 3.10
32+
# =======
33+
34+
builtins.ellipsis # type is not exposed anywhere
35+
importlib._abc.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined for backwards compatibility
36+
37+
# positional-only complaints caused by differences between typing aliases and the "real" classes in the stdlib
38+
_collections_abc.Coroutine.send
39+
_collections_abc.Coroutine.throw
40+
_collections_abc.Generator.send
41+
_collections_abc.Generator.throw
42+
43+
# These are not positional-only at runtime, but we treat them as positional-only to match dict.
44+
_collections_abc.MutableMapping.pop
45+
_collections_abc.MutableMapping.setdefault
46+
47+
# These three have a pos-or-keyword first parameter at runtime, but deliberately have a pos-only first parameter in the stub. #6812
48+
posixpath.join
49+
ntpath.join
50+
os.path.join
51+
52+
# typing.IO uses positional-or-keyword arguments, but in the stubs we prefer
53+
# to mark these as positional-only for compatibility with existing sub-classes.
54+
typing(_extensions)?\.BinaryIO\.write
55+
typing(_extensions)?\.IO\.read
56+
typing(_extensions)?\.IO\.readline
57+
typing(_extensions)?\.IO\.readlines
58+
typing(_extensions)?\.IO\.seek
59+
typing(_extensions)?\.IO\.truncate
60+
typing(_extensions)?\.IO\.write
61+
typing(_extensions)?\.IO\.writelines
62+
63+
64+
# =============================================================
65+
# Allowlist entries that cannot or should not be fixed; >= 3.13
66+
# =============================================================
67+
68+
_pyrepl\..+ # The internal implementation of the REPL on py313+; not for public consumption
69+
codecs.backslashreplace_errors # Runtime incorrectly has `self`
70+
codecs.ignore_errors # Runtime incorrectly has `self`
71+
codecs.namereplace_errors # Runtime incorrectly has `self`
72+
codecs.replace_errors # Runtime incorrectly has `self`
73+
codecs.strict_errors # Runtime incorrectly has `self`
74+
codecs.xmlcharrefreplace_errors # Runtime incorrectly has `self`
75+
76+
# These multiprocessing proxy methods have *args, **kwargs signatures at runtime,
77+
# But have more precise (accurate) signatures in the stub
78+
multiprocessing.managers._BaseDictProxy.__iter__
79+
multiprocessing.managers._BaseDictProxy.__len__
80+
multiprocessing.managers._BaseDictProxy.clear
81+
multiprocessing.managers._BaseDictProxy.copy
82+
multiprocessing.managers._BaseDictProxy.items
83+
multiprocessing.managers._BaseDictProxy.keys
84+
multiprocessing.managers._BaseDictProxy.popitem
85+
multiprocessing.managers._BaseDictProxy.values
86+
87+
# To match `dict`, we lie about the runtime, but use overloads to match the correct behavior
88+
types.MappingProxyType.get
89+
90+
typing_extensions.Protocol # Super-special typing primitive
91+
92+
93+
# =============================================================
94+
# Allowlist entries that cannot or should not be fixed; >= 3.12
95+
# =============================================================
96+
97+
# Runtime AST node runtime constructor behaviour is too loose.
98+
# For static typing, the loose behaviour is undesirable (https://github.com/python/typeshed/issues/8378).
99+
# For the runtime, the loose behaviour is deprecated in Python 3.13 (https://github.com/python/cpython/issues/105858)
100+
_?ast.type_param.__init__
101+
102+
# Deprecation wrapper classes; their methods are just pass-through, so we can ignore them.
103+
importlib.metadata.DeprecatedNonAbstract.__new__
104+
105+
# Deprecated argument is supported at runtime by renaming it through a decorator.
106+
importlib.resources._common.files
107+
importlib.resources.files
108+
109+
sys._monitoring # Doesn't really exist. See comments in the stub.
110+
sys.last_exc # not always defined
111+
112+
# These only exist to give a better error message if you try to subclass an instance
113+
typing.ParamSpec.__mro_entries__
114+
typing.ParamSpecArgs.__mro_entries__
115+
typing.ParamSpecKwargs.__mro_entries__
116+
typing.TypeVar.__mro_entries__
117+
typing.TypeVarTuple.__mro_entries__
118+
119+
# These exist at runtime because the protocol uses PEP-695 syntax in CPython
120+
typing.SupportsAbs.__type_params__
121+
typing.SupportsRound.__type_params__
122+
typing_extensions.SupportsAbs.__type_params__
123+
typing_extensions.SupportsRound.__type_params__
124+
125+
126+
# =============================================================
127+
# Allowlist entries that cannot or should not be fixed; >= 3.11
128+
# =============================================================
129+
130+
argparse._MutuallyExclusiveGroup.add_mutually_exclusive_group # deprecated, forwards arguments to super
131+
enum.auto.__init__ # The stub for enum.auto is nothing like the implementation
132+
enum.auto.value # The stub for enum.auto is nothing like the implementation
133+
http.HTTPMethod.description # mutable instance attribute at runtime but we pretend it's a property
134+
importlib.resources.abc.Traversable.open # Problematic protocol signature at runtime, see source code comments.
135+
inspect._ParameterKind.description # Still exists, but stubtest can't see it
136+
typing\._SpecialForm.* # Super-special typing primitive
137+
typing\.LiteralString # Super-special typing primitive
138+
139+
140+
# =============================================================
141+
# Allowlist entries that cannot or should not be fixed; >= 3.10
142+
# =============================================================
143+
144+
# Runtime AST node runtime constructor behaviour is too loose.
145+
# For static typing, the loose behaviour is undesirable (https://github.com/python/typeshed/issues/8378).
146+
# For the runtime, the loose behaviour is deprecated in Python 3.13 (https://github.com/python/cpython/issues/105858)
147+
_?ast.pattern.__init__
148+
149+
_collections_abc.AsyncGenerator.athrow # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also.
150+
builtins.property.__set_name__ # Doesn't actually exist
151+
collections\.UserList\.index # ignoring pos-or-keyword parameter
152+
dataclasses.KW_ONLY # white lies around defaults
153+
importlib.metadata._meta.SimplePath.joinpath # Runtime definition of protocol is incorrect
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# =======
2+
# >= 3.12
3+
# =======
4+
5+
# Undocumented internal method, not really for public consumption.
6+
# (Hard to add types for unless we add stubs for the undocumented _overlapped module...)
7+
asyncio.IocpProactor.finish_socket_func
8+
asyncio.windows_events.IocpProactor.finish_socket_func

0 commit comments

Comments
 (0)