Skip to content

[pull] main from python:main - #1463

Merged
pull[bot] merged 9 commits into
tj-python:mainfrom
python:main
Sep 10, 2026
Merged

[pull] main from python:main#1463
pull[bot] merged 9 commits into
tj-python:mainfrom
python:main

Conversation

@pull

@pull pull Bot commented Sep 10, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

fuhsnn and others added 9 commits September 10, 2026 14:18
Extend the _Py_TYPEOF macro to use __typeof__() with MSVC 17.9 and newer,
or decltype() under C++11 and newer.
…H-157180)

GH-156003 made ZipExtFile._read1() call decompress(data, max_length) on
non-deflate decompressors and consult needs_input before reading more. A
decompressor installed by monkey-patching _get_decompressor() (as projects
like zipfile-zstd, zipfile-deflate64, ... do) may support neither, and every read
through it then failed with AttributeError.

- Make LZMADecompressor.needs_input public to simplify implementation.
- Make the needs_input attribute optional.
- If `decompress()` fails with TypeError, try again with one argument.
- Since the fallback to one-argument call is a maintenance burden, raise
  DeprecationWarning.
- Add tests for future changes, so we can make informed decisions
  about breaking monkey-patchers.

Co-authored-by: Petr Viktorin <encukou@gmail.com>
…H-157147)

linecache.getline() now works for a .zip archive on sys.path without the caller having to pass module_globals. Callers that only have a file name, such as pdb, warnings, and doctest, now get source. Reads of such files go through the get_data() method of the path entry finder registered for the archive in sys.path_importer_cache.

Prior to this: os.stat() would fail on the archive-internal path, the loader lookup needed the globals, and the sys.path search would only handle relative names and assumed a filesystem rather than using an importer.
…7225)

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
Add `@vectorcall` as a decorator to Argument Clinic (AC) which generates a new
[Vectorcall Protocol](https://docs.python.org/3/c-api/call.html#the-vectorcall-protocol)
argument parsing C function named `{}_vectorcall`. This is only supported for
`__new__` and `__init__` currently to simplify implementation.

The generated code has similar or better performance to existing hand-written
cases for `list`, `float`, `str`, `tuple`, `enumerate`, `reversed`, and `int`.
Using the decorator added vectorcall to `bytearray` and construction got
1.09x faster. For more details see the comments in gh-87613.
@pull pull Bot locked and limited conversation to collaborators Sep 10, 2026
@pull pull Bot added the ⤵️ pull label Sep 10, 2026
@pull
pull Bot merged commit 092c896 into tj-python:main Sep 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants