Skip to content

Commit 5ffef5e

Browse files
Merge branch 'main' into tvt
2 parents d111950 + 40787ee commit 5ffef5e

45 files changed

Lines changed: 618 additions & 254 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/tests.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ jobs:
7171
- uses: actions/checkout@v6
7272
- uses: actions/setup-python@v6
7373
with:
74-
python-version: "3.15"
75-
allow-prereleases: true
76-
check-latest: true
74+
python-version: "3.14"
7775
- uses: astral-sh/setup-uv@v7
7876
with:
7977
version-file: "requirements-tests.txt"

requirements-tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Type checkers that we test our stubs against. These should always
22
# be pinned to a specific version to make failure reproducible.
3-
mypy==1.20.0
3+
mypy==2.0.0
44
pyright==1.1.409
55

66
# Libraries used by our various scripts.

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
# TODO: Allowlist entries that should be fixed
33
# ============================================
44

5-
_decimal.SPEC_VERSION
65
_pyrepl.fancy_termios
76
_pyrepl.unix_console
87
_pyrepl.unix_eventqueue
98
ctypes.c_double_complex._type_
109
ctypes.c_float_complex._type_
1110
ctypes.c_longdouble_complex._type_
12-
decimal.SPEC_VERSION
1311
mmap.MS_ASYNC
1412
mmap.MS_INVALIDATE
1513
mmap.MS_SYNC

stdlib/@tests/stubtest_allowlists/py315.txt

Lines changed: 3 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# TODO: Allowlist entries that should be fixed
33
# ============================================
44

5-
_collections_abc.__all__
65
_frozen_importlib.BuiltinImporter.load_module
76
_frozen_importlib.FrozenImporter.load_module
87
_frozen_importlib_external.FileFinder.discover
@@ -15,10 +14,6 @@ _frozen_importlib_external._LoaderBasics.load_module
1514
_frozen_importlib_external.cache_from_source
1615
_interpqueues.create
1716
_interpqueues.put
18-
_json.make_scanner.array_hook
19-
_json.scanstring
20-
_pydecimal.SPEC_VERSION
21-
_pydecimal.__all__
2217
_pyrepl.base_eventqueue
2318
_pyrepl.commands
2419
_pyrepl.completing_reader
@@ -41,7 +36,6 @@ _pyrepl.types
4136
_pyrepl.utils
4237
_pyrepl.windows_console
4338
_pyrepl.windows_eventqueue
44-
_sqlite3.SQLITE_KEYWORDS
4539
_ssl.HAS_PSK_TLS13
4640
_ssl._SSLContext.get_groups
4741
_ssl._SSLContext.set_ciphersuites
@@ -80,9 +74,6 @@ ast.ImportFrom.is_lazy
8074
ast.dump
8175
ast.parse
8276
ast.type_param.__init__
83-
asyncio.taskgroups.TaskGroup.cancel
84-
asyncio.tools.display_awaited_by_tasks_table
85-
asyncio.tools.display_awaited_by_tasks_tree
8677
base64.a85decode
8778
base64.b16decode
8879
base64.b16encode
@@ -118,23 +109,6 @@ binascii.b2a_base32
118109
binascii.b2a_base64
119110
binascii.b2a_base85
120111
binascii.unhexlify
121-
builtins.ImportCycleError
122-
builtins.__lazy_import__
123-
builtins.bin
124-
builtins.bytearray.replace
125-
builtins.bytearray.take_bytes
126-
builtins.bytes.replace
127-
builtins.compile
128-
builtins.frozendict
129-
builtins.hex
130-
builtins.oct
131-
builtins.sentinel
132-
builtins.slice.__class_getitem__
133-
cProfile.label
134-
calendar.HTMLCalendar.formatmonthpage
135-
calendar.__all__
136-
calendar.standalone_month_abbr
137-
calendar.standalone_month_name
138112
codecs.backslashreplace_errors
139113
codecs.ignore_errors
140114
codecs.namereplace_errors
@@ -143,7 +117,6 @@ codecs.strict_errors
143117
codecs.xmlcharrefreplace_errors
144118
collections.Counter.__ixor__
145119
collections.Counter.__xor__
146-
collections.abc.__all__
147120
concurrent.interpreters._crossinterp.UNBOUND_ERROR
148121
concurrent.interpreters._crossinterp.UNBOUND_REMOVE
149122
concurrent.interpreters._crossinterp.UnboundItem.singleton
@@ -158,16 +131,8 @@ concurrent.interpreters._crossinterp.classonly.__wrapped__
158131
copy.deepcopy
159132
ctypes.SetPointerType
160133
dataclasses._MISSING_TYPE
161-
datetime.date.fromisoformat
162-
datetime.date.strptime
163-
datetime.datetime.fromisoformat
164-
datetime.datetime.strptime
165-
datetime.time.fromisoformat
166-
datetime.time.strptime
167-
dbm.dumb._Database.reorganize
168-
dbm.sqlite3.REORGANIZE
169-
dbm.sqlite3._Database.reorganize
170-
difflib.unified_diff
134+
dataclasses.MISSING
135+
dataclasses.field
171136
doctest.DocTestRunner.report_skip
172137
enum.__all__
173138
enum.auto.__init__
@@ -214,9 +179,6 @@ io.Reader.__class_getitem__
214179
io.Reader.read
215180
io.Writer.__class_getitem__
216181
io.Writer.write
217-
json.decoder.JSONDecoder.__init__
218-
json.load
219-
json.loads
220182
mailbox.Mailbox.__enter__
221183
mailbox.Mailbox.__exit__
222184
mailbox._ProxyFile.__class_getitem__
@@ -294,11 +256,8 @@ profiling.sampling.sample
294256
profiling.sampling.stack_collector
295257
profiling.sampling.string_table
296258
profiling.tracing
297-
pstats.Stats.print_call_subheading
298259
pydoc.Doc.STDLIB_DIR
299260
pydoc.Doc.getdocloc
300-
pyexpat.XMLParserType.SetBillionLaughsAttackProtectionActivationThreshold
301-
pyexpat.XMLParserType.SetBillionLaughsAttackProtectionMaximumAmplification
302261
re.Pattern.prefixmatch
303262
re.__all__
304263
re.prefixmatch
@@ -313,13 +272,6 @@ site.addsitedir
313272
site.addsitepackages
314273
site.addusersitepackages
315274
site.process_startup_files
316-
sqlite3.Connection.create_aggregate
317-
sqlite3.Connection.create_function
318-
sqlite3.Connection.set_authorizer
319-
sqlite3.Connection.set_progress_handler
320-
sqlite3.Connection.set_trace_callback
321-
sqlite3.SQLITE_KEYWORDS
322-
sqlite3.dbapi2.SQLITE_KEYWORDS
323275
sre_compile
324276
sre_constants
325277
sre_parse
@@ -329,18 +281,6 @@ ssl.SSLObject.server_sigalg
329281
ssl.SSLSocket.client_sigalg
330282
ssl.SSLSocket.group
331283
ssl.SSLSocket.server_sigalg
332-
stat.STATX_ATTR_APPEND
333-
stat.STATX_ATTR_AUTOMOUNT
334-
stat.STATX_ATTR_COMPRESSED
335-
stat.STATX_ATTR_DAX
336-
stat.STATX_ATTR_ENCRYPTED
337-
stat.STATX_ATTR_IMMUTABLE
338-
stat.STATX_ATTR_MOUNT_ROOT
339-
stat.STATX_ATTR_NODUMP
340-
stat.STATX_ATTR_VERITY
341-
stat.STATX_ATTR_WRITE_ATOMIC
342-
symtable.Function.get_cells
343-
symtable.Symbol.is_cell
344284
symtable.symtable
345285
sys.__jit
346286
sys._monitoring
@@ -351,7 +291,6 @@ sys.last_exc
351291
sys.lazy_modules
352292
sys.set_lazy_imports
353293
sys.set_lazy_imports_filter
354-
sysconfig.is_python_build
355294
tarfile.TarFile.__init__
356295
threading.Condition.locked
357296
threading.__all__
@@ -391,33 +330,17 @@ types.UnionType.__qualname__
391330
types.__all__
392331
typing.LiteralString
393332
typing.NewType.__mro_entries__
394-
typing.NoExtraItems
395333
typing.ParamSpec.__mro_entries__
396334
typing.ParamSpecArgs.__mro_entries__
397335
typing.ParamSpecKwargs.__mro_entries__
398336
typing.SupportsAbs.__type_params__
399337
typing.SupportsRound.__type_params__
400-
typing.TypeAliasType.__qualname__
401-
typing.TypeForm
402338
typing.TypeVar.__mro_entries__
403-
typing.TypeVarTuple.__bound__
404-
typing.TypeVarTuple.__contravariant__
405-
typing.TypeVarTuple.__covariant__
406-
typing.TypeVarTuple.__infer_variance__
407339
typing.TypeVarTuple.__mro_entries__
408340
typing.Union
409341
typing._SpecialForm.__mro_entries__
410-
typing.__all__
411-
typing.disjoint_base
412-
typing.no_type_check_decorator
342+
typing_extensions.__all__
413343
typing_extensions.Protocol
414-
unicodedata.block
415-
unicodedata.extended_pictographic
416-
unicodedata.grapheme_cluster_break
417-
unicodedata.indic_conjunct_break
418-
unicodedata.isxidcontinue
419-
unicodedata.isxidstart
420-
unicodedata.iter_graphemes
421344
unittest._log._AssertLogsContext.__init__
422345
unittest.case.TestCase.assertLogs
423346
urllib.parse._DefragResultBase.geturl
@@ -444,5 +367,3 @@ xml.etree.ElementTree.__all__
444367
xml.is_valid_name
445368
xml.utils
446369
zipimport.zipimporter.load_module
447-
zlib.adler32_combine
448-
zlib.crc32_combine

stdlib/@tests/stubtest_allowlists/win32-py315.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# TODO: Allowlist entries that should be fixed
33
# ============================================
44

5-
_decimal.SPEC_VERSION
65
_socket.IPV6_HDRINCL
76
_winapi.DeregisterEventSource
87
_winapi.EVENTLOG_AUDIT_FAILURE
@@ -15,7 +14,6 @@ _winapi.GetOEMCP
1514
_winapi.RegisterEventSource
1615
_winapi.ReportEvent
1716
asyncio.windows_events.IocpProactor.finish_socket_func
18-
decimal.SPEC_VERSION
1917
socket.IPV6_HDRINCL
2018
socket.__all__
2119
winreg.DeleteTree

stdlib/_collections_abc.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ __all__ = [
6060
"ValuesView",
6161
"Sequence",
6262
"MutableSequence",
63-
"ByteString",
6463
]
64+
if sys.version_info < (3, 15):
65+
__all__ += ["ByteString"]
6566
if sys.version_info >= (3, 12):
6667
__all__ += ["Buffer"]
6768

stdlib/_decimal.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ _TrapType: TypeAlias = type[DecimalException]
2525

2626
__version__: Final[str]
2727
__libmpdec_version__: Final[str]
28+
if sys.version_info >= (3, 15):
29+
SPEC_VERSION: Final[str]
2830

2931
ROUND_DOWN: Final = "ROUND_DOWN"
3032
ROUND_HALF_UP: Final = "ROUND_HALF_UP"

stdlib/_json.pyi

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
from collections.abc import Callable
23
from typing import Any, final
34
from typing_extensions import Self
@@ -36,6 +37,8 @@ class make_encoder:
3637

3738
@final
3839
class make_scanner:
40+
if sys.version_info >= (3, 15):
41+
array_hook: Any
3942
object_hook: Any
4043
object_pairs_hook: Any
4144
parse_int: Any
@@ -48,4 +51,9 @@ class make_scanner:
4851

4952
def encode_basestring(s: str, /) -> str: ...
5053
def encode_basestring_ascii(s: str, /) -> str: ...
51-
def scanstring(string: str, end: int, strict: bool = True) -> tuple[str, int]: ...
54+
55+
if sys.version_info >= (3, 15):
56+
def scanstring(pystr: str, end: int, strict: bool = True, /) -> tuple[str, int]: ...
57+
58+
else:
59+
def scanstring(string: str, end: int, strict: bool = True) -> tuple[str, int]: ...

stdlib/_pydecimal.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,6 @@ __all__ = [
4545

4646
if sys.version_info >= (3, 14):
4747
__all__ += ["IEEEContext", "IEEE_CONTEXT_MAX_BITS"]
48+
49+
if sys.version_info >= (3, 15):
50+
__all__ += ["SPEC_VERSION"]

stdlib/_sqlite3.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ SQLITE_SAVEPOINT: Final = 32
6969
SQLITE_SELECT: Final = 21
7070
SQLITE_TRANSACTION: Final = 22
7171
SQLITE_UPDATE: Final = 23
72+
if sys.version_info >= (3, 15):
73+
SQLITE_KEYWORDS: tuple[str, ...]
7274
adapters: dict[tuple[type[Any], type[Any]], _Adapter[Any]]
7375
converters: dict[str, _Converter]
7476
sqlite_version: str

0 commit comments

Comments
 (0)