Skip to content

Commit 02b2146

Browse files
authored
Merge branch 'main' into tkinter-remove-typealiases
2 parents 2278669 + ad3d849 commit 02b2146

File tree

23 files changed

+186
-85
lines changed

23 files changed

+186
-85
lines changed

pyrightconfig.stricter.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
"stubs/tqdm",
9393
"stubs/vobject",
9494
"stubs/workalendar",
95+
"stubs/xmltodict",
9596
],
9697
"typeCheckingMode": "strict",
9798
// TODO: Complete incomplete stubs

stdlib/@tests/stubtest_allowlists/common.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,12 @@ _collections_abc.AsyncGenerator.__anext__
181181
_collections_abc.AsyncGenerator.aclose
182182
_collections_abc.AsyncIterator.__anext__
183183

184+
# Pretend typing.ByteString is a Union, to better match its documented semantics.
185+
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
186+
# because it's not an ABC that makes any sense and was deprecated in 3.12
187+
_collections_abc\.ByteString
188+
typing\.ByteString
189+
184190
_collections_abc.Callable # Typing-related weirdness
185191
_collections_abc.Mapping.get # Adding None to the Union messed up mypy
186192
_collections_abc.Sequence.index # Supporting None in end is not mandatory

stdlib/@tests/stubtest_allowlists/darwin-py311.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,11 @@ _msi
2929
msilib(.[a-z]+)?
3030
ossaudiodev
3131
spwd
32+
33+
34+
# ================
35+
# Unclear problems
36+
# ================
37+
38+
# Added in 3.11.1, flagged by stubtest on Python < 3.14 for unknown reasons
39+
errno.ENOTCAPABLE

stdlib/@tests/stubtest_allowlists/darwin-py312.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,11 @@ _msi
1717
msilib(.[a-z]+)?
1818
ossaudiodev
1919
spwd
20+
21+
22+
# ================
23+
# Unclear problems
24+
# ================
25+
26+
# Added in 3.11.1, flagged by stubtest on Python < 3.14 for unknown reasons
27+
errno.ENOTCAPABLE

stdlib/@tests/stubtest_allowlists/darwin-py313.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,11 @@
33
# =======
44

55
(mmap.MAP_32BIT)? # Exists locally on MacOS but not on GitHub
6+
7+
8+
# ================
9+
# Unclear problems
10+
# ================
11+
12+
# Added in 3.11.1, flagged by stubtest on Python < 3.14 for unknown reasons
13+
errno.ENOTCAPABLE

stdlib/@tests/stubtest_allowlists/py310.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,19 +155,12 @@ tkinter.tix.TkVersion
155155
# <= 3.13
156156
# =======
157157

158-
# Pretend typing.ByteString is a Union, to better match its documented semantics.
159-
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
160-
# because it's not an ABC that makes any sense and was deprecated in 3.12
161-
_collections_abc.ByteString
162-
163158
ast.Ellipsis.__new__ # Implementation has *args, but shouldn't allow any
164159

165160
_?hashlib.scrypt # Raises TypeError if salt, n, r or p are None
166161

167162
importlib.abc.Traversable.open # Problematic protocol signature at runtime, see source code comments.
168163

169-
typing\.ByteString
170-
171164
# Will always raise. Not included to avoid type checkers inferring that
172165
# TypeAliasType instances are callable.
173166
typing_extensions.TypeAliasType.__call__

stdlib/@tests/stubtest_allowlists/py311.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,12 @@ tkinter.tix.TkVersion
121121
# <= 3.13
122122
# =======
123123

124-
# Pretend typing.ByteString is a Union, to better match its documented semantics.
125-
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
126-
# because it's not an ABC that makes any sense and was deprecated in 3.12
127-
_collections_abc.ByteString
128-
129124
ast.Ellipsis.__new__ # Implementation has *args, but shouldn't allow any
130125

131126
_?hashlib.scrypt # Raises TypeError if salt, n, r or p are None
132127

133128
importlib.abc.Traversable.open # Problematic protocol signature at runtime, see source code comments.
134129

135-
typing\.ByteString
136-
137130
# Will always raise. Not included to avoid type checkers inferring that
138131
# TypeAliasType instances are callable.
139132
typing_extensions.TypeAliasType.__call__

stdlib/@tests/stubtest_allowlists/py312.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,19 +120,12 @@ tkinter.tix.TkVersion
120120
# <= 3.13
121121
# =======
122122

123-
# Pretend typing.ByteString is a Union, to better match its documented semantics.
124-
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
125-
# because it's not an ABC that makes any sense and was deprecated in 3.12
126-
_collections_abc.ByteString
127-
128123
ast.Ellipsis.__new__ # Implementation has *args, but shouldn't allow any
129124

130125
_?hashlib.scrypt # Raises TypeError if salt, n, r or p are None
131126

132127
importlib.abc.Traversable.open # Problematic protocol signature at runtime, see source code comments.
133128

134-
typing\.ByteString
135-
136129
# Will always raise. Not included to avoid type checkers inferring that
137130
# TypeAliasType instances are callable.
138131
typing_extensions.TypeAliasType.__call__

stdlib/@tests/stubtest_allowlists/py313.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,12 @@ typing(_extensions)?\.IO\.writelines
8181
# <= 3.13
8282
# =======
8383

84-
# Pretend typing.ByteString is a Union, to better match its documented semantics.
85-
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
86-
# because it's not an ABC that makes any sense and was deprecated in 3.12
87-
_collections_abc.ByteString
88-
8984
ast.Ellipsis.__new__ # Implementation has *args, but shouldn't allow any
9085

9186
_?hashlib.scrypt # Raises TypeError if salt, n, r or p are None
9287

9388
importlib.abc.Traversable.open # Problematic protocol signature at runtime, see source code comments.
9489

95-
typing\.ByteString
96-
9790
# Will always raise. Not included to avoid type checkers inferring that
9891
# TypeAliasType instances are callable.
9992
typing_extensions.TypeAliasType.__call__

stdlib/@tests/stubtest_allowlists/py39.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ collections.AsyncGenerator.__anext__ # async at runtime, deliberately not in th
1818
collections.AsyncGenerator.aclose # async at runtime, deliberately not in the stub, see #7491
1919
collections.AsyncGenerator.asend # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also.
2020
collections.AsyncIterator.__anext__ # async at runtime, deliberately not in the stub, see #7491
21-
collections.ByteString # see comments in py3_common.txt
21+
collections.ByteString # see comments in common.txt
2222
collections.Callable
2323
collections.Mapping.get # Adding None to the Union messed up mypy
2424
collections.Sequence.index # Supporting None in end is not mandatory
@@ -104,19 +104,12 @@ tkinter.tix.TkVersion
104104
# <= 3.13
105105
# =======
106106

107-
# Pretend typing.ByteString is a Union, to better match its documented semantics.
108-
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
109-
# because it's not an ABC that makes any sense and was deprecated in 3.12
110-
_collections_abc.ByteString
111-
112107
ast.Ellipsis.__new__ # Implementation has *args, but shouldn't allow any
113108

114109
_?hashlib.scrypt # Raises TypeError if salt, n, r or p are None
115110

116111
importlib.abc.Traversable.open # Problematic protocol signature at runtime, see source code comments.
117112

118-
typing\.ByteString
119-
120113
# Will always raise. Not included to avoid type checkers inferring that
121114
# TypeAliasType instances are callable.
122115
typing_extensions.TypeAliasType.__call__

0 commit comments

Comments
 (0)