Repository navigation
[pull] main from python:main - #1528
Merged
Merged
Conversation
) _CallPythonObject() only wrote restype->size bytes into the closure's result buffer, leaving the unused high-order bits of the ffi_arg-sized register untouched. libffi's ffi_prep_closure_loc() documents that integral types narrower than a machine register must be widened to fill it, sign-extending signed types. On architectures that always read the full register for narrow return values (s390x), this leaves garbage in the high bits, which broke libclang callbacks used by cindex.py.
…157898) _Py_hashtable_set() returns -1 on failure, so the "< -1" check could never be true and the Py_FatalError() call was unreachable.
* gh-157660: Fix stale TLBC caches in _remote_debugging `profiling.sampling` reporting errors or incorrect line numbers in free-threaded builds when a thread-local bytecode array grows or gains entries after being cached. * gh-157660: Retry transient sampling races in TLBC tests --------- Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
…thods without `_PyArg_Parser` (#157483) * gh-136681: Drop _PyArg_Parser for positional-only defining-class methods A method that takes a defining class and whose other parameters are all positional-only (e.g. decimal.Decimal.from_float) was routed through Argument Clinic's generic keyword path: it emitted a static _PyArg_Parser, an (empty) keyword tuple and an _PyArg_UnpackKeywords() call, even though it accepts no keyword arguments. Such methods now go through parse_pos_only(): the wrapper still uses the mandatory METH_METHOD|METH_FASTCALL|METH_KEYWORDS convention (the only one that delivers the defining class), but it rejects keywords with _PyArg_NoKwnames() and reads positional arguments directly, with no parser, keyword tuple or argsbuf. This converts 135 methods across 19 clinic headers, removing the static _PyArg_Parser, the keyword arrays/tuples and the per-call _PyArg_UnpackKeywords() + parser_init() overhead for each. _PyArg_NoKwnames() is now exported (PyAPI_FUNC) so generated code in shared extension modules can use it, like _PyArg_NoKeywords(). Error messages for these methods now match ordinary positional-only functions ("expected ... arguments" / "takes no keyword arguments" instead of the _PyArg_UnpackKeywords phrasing); affected stdlib tests are updated accordingly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * gh-157407: Rename NEWS entry to the correct issue number Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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 : )