Initial implementation of PEP 661 v2 (sentinels)#4
Open
JelleZijlstra wants to merge 83 commits intomainfrom
Open
Initial implementation of PEP 661 v2 (sentinels)#4JelleZijlstra wants to merge 83 commits intomainfrom
JelleZijlstra wants to merge 83 commits intomainfrom
Conversation
Owner
Author
|
Open questions:
|
Viicos
reviewed
Apr 17, 2026
Gave thoughts on python/peps#4923 (comment). |
…ex types in the ctype module (pythonGH-148485) Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
…python#148685) Doc: fix misplaced pprint entries in What's New 3.15
…hon#148657) The option parsing in Modules/_zstd/decompressor.c had a missing Py_DECREF(value) before the early return -1 when PyLong_AsInt(key) fails. The identical code in Modules/_zstd/compressor.c line 158 has the fix.
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
…le objects (pythonGH-148698) Forbid marshalling recursive code, slice and frozendict objects which cannot be correctly unmarshalled. Reject invalid marshal data produced by marshalling recursive frozendict objects which was previously incorrectly unmarshalled. Add multiple tests for recursive data structures.
Co-authored-by: Stan Ulbrych <stan@python.org>
…#148689) If _BlocksOutputBuffer_Finish() fails (memory allocation failure), PyBytesWriter_Discard() is called on the writer. Then if _BlocksOutputBuffer_OnError() is called, it calls again PyBytesWriter_Discard() causing a double free. Fix _BlocksOutputBuffer_Finish() by setting buffer->writer to NULL, so _BlocksOutputBuffer_OnError() does nothing instead of calling PyBytesWriter_Discard() again.
DanielNoord
reviewed
Apr 18, 2026
DanielNoord
left a comment
There was a problem hiding this comment.
I only looked at the .rst file as my minimal knowledge of C won't help much here. There are a couple of double spaces in some of them, perhaps before merging quickly grep for " " in the diff to remove those :)
Owner
Author
|
Thanks for looking! I think the double spaces are mainly between sentences, that's very common in the docs. It doesn't affect rendering. |
…Ts (python#148704) Export a few more functions required for external JITs
…s.py (python#143317) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
…148408) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
…ases (python#143316) The documentation previously stated that Concatenate is only valid when used as the first argument to Callable, but according to PEP 612, it can also be used when instantiating user-defined generic classes with ParamSpec parameters.
…hints()` (python#143758) Do not mention `__annotations__` dictionaries, as this is slightly outdated since 3.14. Rewrite the note about possible exceptions for clarity. Also do not mention imported type aliases, as since 3.12 aliases with the `type` statement do not suffer from this limitation anymore.
…pythonGH-148302) Improve ABI/feature selection, add new header for it. Add a test that Python headers themselves don't use Py_GIL_DISABLED in abi3t: abi3 and abi3t ought to be the same except the _Py_OPAQUE_PYOBJECT differences. This is done using the GCC-only poison pragma. Co-authored-by: Victor Stinner <vstinner@python.org>
…` on free-threading (python#148908)
… string representations of ForwardRef (python#148682) Co-authored-by: Shamil <ashm.tech@proton.me>
…from both `ValueError` and `IndexError` (python#148664) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Stan Ulbrych <stan@python.org>
… Lines file (python#132632) Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
pythongh-148886) Avoid racing with the owning thread's refcount operations when immortalizing an interned string: if we don't own it and its refcount isn't merged, intern a copy we own instead. Use atomic stores in _Py_SetImmortalUntracked so concurrent atomic reads are race-free.
Add '+' alternatives to signed_number and signed_real_number grammar rules, mirroring how unary minus is already handled for pattern matching. Unary plus is a no-op on numbers so the value is returned directly without wrapping in a UnaryOp node.
…ntend (pythonGH-148089) * Replaces ad-hoc logic for ending traces with a simple inequality: `fitness < exit_quality` * Fitness starts high and is reduced for branches, backward edges, calls and trace length * Exit quality reflect how good a spot that instruction is to end a trace. Closing a loop is very, specializable instructions are very low and the others in between.
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Improve `hash()` builtin docstring with caveats. Mention its return type and that the value can be expected to change between processes (hash randomization). Why? The `hash` builtin gets reached for and used by a lot of people whether it is the right tool or not. IDEs surface docstrings and people use pydoc and `help(hash)`.
Fixes python#108951 Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> Co-authored-by: Guido van Rossum <guido@python.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📚 Documentation preview 📚: https://cpython-previews--4.org.readthedocs.build/