GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add Python 3.15 argparse ast and runtime updates by JelleZijlstra · Pull Request #15736 · python/typeshed

Conversation

@JelleZijlstra

@JelleZijlstra JelleZijlstra commented May 9, 2026

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

  • Added argparse suggest_on_error and color parameters, changed the 3.15 suggest_on_error default, removed HelpFormatter(color=...), and added formatter parameters to ArgumentParser.format_usage(), format_help(), and _get_formatter() (CPython PR: gh-140448: Default suggest_on_error to True in argparse.ArgumentParser cpython#140450; source: https://github.com/python/cpython/blob/e81025e6d2e01e38c5a5b656af5739ac9df5ff55/Lib/argparse.py)
  • Added array typecodes for half-precision and complex arrays and widened array.typecodes (CPython PRs: Support half-floats in the array module cpython#146238, Add support for numpy buffer format Zf and Zd cpython#148675; source: https://github.com/python/cpython/blob/main/Modules/arraymodule.c)
  • Added ast.dump(color=...) (CPython PR: Add colour to ast.dump output cpython#148981; source: https://github.com/python/cpython/blob/main/Lib/ast.py)
  • Added ast.Import.is_lazy and ast.ImportFrom.is_lazy for lazy imports (CPython source: https://github.com/python/cpython/blob/e81025e6d2e01e38c5a5b656af5739ac9df5ff55/Parser/Python.asdl)
  • Added faulthandler max_threads parameters (CPython PR: faulthandler: make per-call thread dump cap configurable cpython#149085; source: https://github.com/python/cpython/blob/main/Modules/faulthandler.c)
  • Added dbm.dumb._Database.reorganize, dbm.sqlite3.REORGANIZE, dbm.sqlite3._Database.reorganize, shelve.ShelveError, and shelve serializer/deserializer keyword-only parameters (CPython PRs: DBM Module Vacuuming cpython#134004, Custom unpickler and pickler for the shelve module  cpython#99631; sources: https://github.com/python/cpython/blob/main/Lib/dbm/dumb.py, https://github.com/python/cpython/blob/e81025e6d2e01e38c5a5b656af5739ac9df5ff55/Lib/dbm/sqlite3.py, https://github.com/python/cpython/blob/e81025e6d2e01e38c5a5b656af5739ac9df5ff55/Lib/shelve.py)
  • Added re.prefixmatch and Pattern.prefixmatch (CPython PR: Proposal: re.prefixmatch method (alias for re.match) cpython#86519; source: https://github.com/python/cpython/blob/main/Lib/re/__init__.py)
  • Added tarfile.TarFile.__init__(mtime=...) (CPython source: https://github.com/python/cpython/blob/e81025e6d2e01e38c5a5b656af5739ac9df5ff55/Lib/tarfile.py)
  • Added unittest.TestCase.assertLogs(formatter=...) (CPython PR: Expose log format to users in assertLogs cpython#134567; source: https://github.com/python/cpython/blob/main/Lib/unittest/case.py)
  • Added warnings.WarningMessage(module=...) and .module attribute (CPython source: https://github.com/python/cpython/blob/e81025e6d2e01e38c5a5b656af5739ac9df5ff55/Lib/_py_warnings.py)
  • Added wave.WAVE_FORMAT_IEEE_FLOAT, getformat, setformat, and 7-field params; removed marker methods for 3.15 (CPython PRs: wave file module does not support 32bit float format cpython#60729, Remove deprecated mark interface for wave.Wave_{read,write} classes cpython#133873; source: https://github.com/python/cpython/blob/main/Lib/wave.py)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@JelleZijlstra
Add more Python 3.15 stdlib updates
3a4ae25
@github-actions

This comment has been minimized.

Sign in to view
JelleZijlstra
JelleZijlstra commented May 9, 2026
View reviewed changes
Comment thread stdlib/ast.pyi
__match_args__ = ("key", "value", "generators")
key: expr
value: expr
if sys.version_info >= (3, 15):

@JelleZijlstra JelleZijlstra May 9, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

PEP 798

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@JelleZijlstra
Address runtime helpers PR feedback
f8be3b2
@github-actions

This comment has been minimized.

Sign in to view
JelleZijlstra
JelleZijlstra commented May 9, 2026
View reviewed changes
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: ...

@JelleZijlstra JelleZijlstra May 9, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@hauntsaninja hauntsaninja May 9, 2026

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@JelleZijlstra JelleZijlstra May 9, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

true

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@JelleZijlstra
Simplify wave getparams stub
399bcd3
@JelleZijlstra
JelleZijlstra marked this pull request as ready for review May 9, 2026 02:31
@github-actions

This comment has been minimized.

Sign in to view
hauntsaninja
hauntsaninja reviewed May 9, 2026
View reviewed changes
Comment thread stdlib/wave.pyi Outdated

if sys.version_info >= (3, 15):
pass
elif sys.version_info >= (3, 13):

@hauntsaninja hauntsaninja May 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

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)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@JelleZijlstra JelleZijlstra May 9, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Might as well.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
hauntsaninja
hauntsaninja approved these changes May 9, 2026
View reviewed changes
@JelleZijlstra
review
fd08051
@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JelleZijlstra
JelleZijlstra merged commit 551313d into python:main May 9, 2026
56 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@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

Reviewers

@hauntsaninja hauntsaninja hauntsaninja approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@JelleZijlstra @hauntsaninja
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.