Skip to content

Add Python 3.15 argparse ast and runtime updates#15736

Merged
JelleZijlstra merged 4 commits intopython:mainfrom
JelleZijlstra:codex/python315-runtime-helpers
May 9, 2026
Merged

Add Python 3.15 argparse ast and runtime updates#15736
JelleZijlstra merged 4 commits intopython:mainfrom
JelleZijlstra:codex/python315-runtime-helpers

Conversation

@JelleZijlstra
Copy link
Copy Markdown
Member

Summary

Add Python 3.15 stdlib updates for argparse, array, ast, faulthandler, re, shelve, tarfile, unittest, warnings, and wave.

Relevant report entries

@github-actions

This comment has been minimized.

Comment thread stdlib/ast.pyi
__match_args__ = ("key", "value", "generators")
key: expr
value: expr
if sys.version_info >= (3, 15):
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP 798

@github-actions

This comment has been minimized.

Comment thread stdlib/re.pyi Outdated
self: Pattern[bytes], string: ReadableBuffer, pos: int = 0, endpos: int = sys.maxsize
) -> Match[bytes] | None: ...
@overload
def prefixmatch(self, string: AnyStr, pos: int = 0, endpos: int = sys.maxsize) -> Match[AnyStr] | None: ...
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm suspicious about this last overload, I think it allows some wrong calls through. But we already have the same for match(), so I'll leave it like this for now.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we just do prefixmatch = match? that's basically the impl

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true

@JelleZijlstra JelleZijlstra marked this pull request as ready for review May 9, 2026 02:31
@github-actions

This comment has been minimized.

Comment thread stdlib/wave.pyi Outdated

if sys.version_info >= (3, 15):
pass
elif sys.version_info >= (3, 13):
Copy link
Copy Markdown
Collaborator

@hauntsaninja hauntsaninja May 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we usually "backport" deprecations? wondering if this can just be a single if sys.version_info <= (3, 13) branch (similar thing above as well)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@JelleZijlstra JelleZijlstra merged commit 551313d into python:main May 9, 2026
56 checks passed
@JelleZijlstra JelleZijlstra deleted the codex/python315-runtime-helpers branch May 9, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants