summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-115556: Remove quotes from command-line arguments in test.bat and rt.bat ↵Łukasz Langa2024-02-163-21/+29
| | | | | | | | | | | | (#115557) This change essentially replaces usage of `%1` with `%~1`, which removes quotes, if any. Without this change, the if statements fail due to the quotes mangling the syntax. Additionally, this change works around comma being treated as a parameter delimiter in test.bat by escaping commas at time of parsing. Tested combinations of rt and regrtest arguments, all seems to work as before but now you can specify commas in arguments like "-uall,extralargefile".
* gh-112720: make it easier to subclass and modify dis.ArgResolver's jump arg ↵Irit Katriel2024-02-163-11/+37
| | | | resolution (#115564)
* gh-114271: Make `thread._rlock` thread-safe in free-threaded builds (#115102)mpage2024-02-165-10/+68
| | | | | | | | | The ID of the owning thread (`rlock_owner`) may be accessed by multiple threads without holding the underlying lock; relaxed atomics are used in place of the previous loads/stores. The number of times that the lock has been acquired (`rlock_count`) is only ever accessed by the thread that holds the lock; we do not need to use atomics to access it.
* gh-115480: Type / constant propagation for float binary uops (GH-115550)Peter Lazorchak2024-02-163-38/+184
| | | Co-authored-by: Ken Jin <kenjin@python.org>
* gh-115362: Add documentation to pystats output (#115365)Michael Droettboom2024-02-161-77/+224
|
* gh-113743: Give _PyTypes_AfterFork a prototype. (gh-115563)Benjamin Peterson2024-02-161-1/+1
| | | Fixes a compiler warning.
* gh-112529: Make the GC scheduling thread-safe (#114880)Sam Gross2024-02-167-16/+71
| | | | | | | | | | The GC keeps track of the number of allocations (less deallocations) since the last GC. This buffers the count in thread-local state and uses atomic operations to modify the per-interpreter count. The thread-local buffering avoids contention on shared state. A consequence is that the GC scheduling is not as precise, so "test_sneaky_frame_object" is skipped because it requires that the GC be run exactly after allocating a frame object.
* gh-115480: Minor fixups in int constant propagation (GH-115507)Ken Jin2024-02-163-132/+59
|
* gh-102013: Move PyUnstable_GC_VisitObjects() to Include/cpython/objimpl.h ↵Victor Stinner2024-02-162-19/+17
| | | | | | (#115560) Include/objimpl.h must only contain the limited C API, whereas PyUnstable_GC_VisitObjects() is excluded from the limited C API.
* Add `Python/tier2_redundancy_eliminator_cases.c.h` to `.gitattributes` as ↵Nikita Sobolev2024-02-161-1/+1
| | | | generated (#115551)
* gh-69990: Make Profile.print_stats support sorting by multiple values ↵Furkan Onder2024-02-165-4/+20
| | | | | | (GH-104590) Co-authored-by: Chiu-Hsiang Hsu
* gh-113317: Argument Clinic: move C/Py identifier helpers into libclinic ↵Erlend E. Aasland2024-02-163-29/+45
| | | | (#115520)
* gh-115503: Fix `run_presite` error handling (#115504)Nikita Sobolev2024-02-161-1/+0
|
* gh-111968: Split _Py_dictkeys_freelist out of _Py_dict_freelist (gh-115505)Donghee Na2024-02-167-59/+77
|
* gh-113743: Use per-interpreter locks for types (#115541)Dino Viehland2024-02-163-4/+5
| | | Move type-lock to per-interpreter lock to avoid heavy contention in interpreters test
* gh-114572: Fix locking in cert_store_stats and get_ca_certs (#114573)David Benjamin2024-02-162-5/+64
| | | | | | | | | | | | | | | | | * gh-114572: Fix locking in cert_store_stats and get_ca_certs cert_store_stats and get_ca_certs query the SSLContext's X509_STORE with X509_STORE_get0_objects, but reading the result requires a lock. See https://github.com/openssl/openssl/pull/23224 for details. Instead, use X509_STORE_get1_objects, newly added in that PR. X509_STORE_get1_objects does not exist in current OpenSSLs, but we can polyfill it with X509_STORE_lock and X509_STORE_unlock. * Work around const-correctness problem * Add missing X509_STORE_get1_objects failure check * Add blurb
* gh-113317: Argument Clinic: move linear_format into libclinic (#115518)Erlend E. Aasland2024-02-154-56/+76
|
* gh-115498: Fix `SET_COUNT` error handling in `_xxinterpchannelsmodule` (#115499)Nikita Sobolev2024-02-151-1/+1
|
* Merge branch 'main' of https://github.com/python/cpythonThomas Wouters2024-02-1538-139/+1321
|\
| * gh-113743: Make the MRO cache thread-safe in free-threaded builds (#113930)Dino Viehland2024-02-1511-80/+500
| | | | | | | | | | | | | | Makes _PyType_Lookup thread safe, including: Thread safety of the underlying cache. Make mutation of mro and type members thread safe Also _PyType_GetMRO and _PyType_GetBases are currently returning borrowed references which aren't safe.
| * gh-113317: Argument Clinic: inline required_type_for_self_for_parser() in ↵Erlend E. Aasland2024-02-151-9/+4
| | | | | | | | | | self converter (#115522) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
| * gh-100734: What's New in 3.x: Add missing detail from 3.x branch (#114689)Hugo van Kemenade2024-02-158-0/+327
| |
| * gh-112433: Add optional _align_ attribute to ctypes.Structure (GH-113790)monkeyman1922024-02-158-1/+328
| |
| * gh-115420: Fix translation of exception hander targets by ↵Irit Katriel2024-02-153-1/+19
| | | | | | | | _testinternalcapi.optimize_cfg. (#115425)
| * gh-115376: fix segfault in _testinternalcapi.compiler_codegen on bad input ↵Irit Katriel2024-02-153-15/+35
| | | | | | | | (#115379)
| * gh-115124: Use _PyObject_ASSERT() in gc.c (#115125)Victor Stinner2024-02-151-15/+22
| | | | | | | | Replace assert() with _PyObject_ASSERT() in gc.c to dump the object when an assertion fails.
| * gh-115347: avoid emitting redundant NOP for the docstring with -OO (#115494)Irit Katriel2024-02-153-18/+48
| |
| * gh-115432: Add critical section variant that handles a NULL object (#115433)Sam Gross2024-02-152-0/+38
| | | | | | | | | | | | This adds `Py_XBEGIN_CRITICAL_SECTION` and `Py_XEND_CRITICAL_SECTION`, which accept a possibly NULL object as an argument. If the argument is NULL, then nothing is locked or unlocked. Otherwise, they behave like `Py_BEGIN/END_CRITICAL_SECTION`.
* | Post 3.13.0a4Thomas Wouters2024-02-151-1/+1
| |
* | Python 3.13.0a4v3.13.0a4Thomas Wouters2024-02-15141-349/+1471
|/
* gh-115490: Work around test.support.interpreters.channels not handling ↵T. Wouters2024-02-151-2/+7
| | | | | | | | | | unloading (#115515) Work around test.support.interpreters.channels not handling unloading, which regrtest does when running tests sequentially, by explicitly skipping the unloading of test.support.interpreters and its submodules. This can be rolled back once test.support.interpreters.channels supports unloading, if we are keeping sequential runs in the same process around.
* gh-113317: Argument Clinic: remove global clinic instance (#115517)Erlend E. Aasland2024-02-151-7/+3
|
* gh-113317: Argument Clinic: don't use global state in warn() and fail() ↵Erlend E. Aasland2024-02-152-16/+23
| | | | (#115510)
* gh-113317: Argument Clinic: don't use fail() in CLI (#115513)Erlend E. Aasland2024-02-151-2/+2
|
* bpo-38364: unwrap partialmethods just like we unwrap partials (#16600)Martijn Pieters2024-02-155-4/+57
| | | | | | | | | | | | | * bpo-38364: unwrap partialmethods just like we unwrap partials The inspect.isgeneratorfunction, inspect.iscoroutinefunction and inspect.isasyncgenfunction already unwrap functools.partial objects, this patch adds support for partialmethod objects as well. Also: Rename _partialmethod to __partialmethod__. Since we're checking this attribute on arbitrary function-like objects, we should use the namespace reserved for core Python. --------- Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-114626: add PyCFunctionFast and PyCFunctionFastWithKeywords (GH-114627)David Hewitt2024-02-1510-41/+57
| | | Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-114258: Refactor Argument Clinic function name parser (#114930)Erlend E. Aasland2024-02-151-106/+123
| | | | | | | | | | Refactor state_modulename_name() of the parsing state machine, by adding helpers for the sections that deal with ...: 1. parsing the function name 2. normalizing "function kind" 3. dealing with cloned functions 4. resolving return converters 5. adding the function to the DSL parser
* gh-112050: Make collections.deque thread-safe in free-threaded builds (#113830)mpage2024-02-154-61/+338
| | | | | | | Use critical sections to make deque methods that operate on mutable state thread-safe when the GIL is disabled. This is mostly accomplished by using the @critical_section Argument Clinic directive, though there are a few places where this was not possible and critical sections had to be manually acquired/released.
* docs: use consistent .append() in dis.rst (#115434)Ned Batchelder2024-02-151-4/+4
| | | The STACK variable is described as like a Python list, so pushing to it should be done with .append() consistently throughout.
* gh-115480: Type and constant propagation for int BINARY_OPs (GH-115478)Ken Jin2024-02-153-16/+126
|
* Trigger JIT CI with optimizer files (#115483)Ken Jin2024-02-151-0/+4
| | | * Trigger JIT CI with optimizer files
* GH-113516: don't set `LDSHARED` when building for WASI (GH-115495)Brett Cannon2024-02-153-2/+2
|
* gh-115482: Assume the Main Interpreter is Always Running "main" (gh-115484)Eric Snow2024-02-141-1/+8
| | | | | This is a temporary fix to unblock embedders that do not call Py_Main(). _PyInterpreterState_IsRunningMain() will always return true for the main interpreter, even in corner cases where it technically should not. The (future) full solution will do the right thing in those corner cases.
* gh-114570: Add PythonFinalizationError exception (#115352)Victor Stinner2024-02-1413-6/+55
| | | | | | | | | | | | | | | | | Add PythonFinalizationError exception. This exception derived from RuntimeError is raised when an operation is blocked during the Python finalization. The following functions now raise PythonFinalizationError, instead of RuntimeError: * _thread.start_new_thread() * subprocess.Popen * os.fork() * os.fork1() * os.forkpty() Morever, _winapi.Overlapped finalizer now logs an unraisable PythonFinalizationError, instead of an unraisable RuntimeError.
* gh-112529: Use _PyThread_Id() in mimalloc in free-threaded build (#115488)Sam Gross2024-02-142-4/+13
| | | | | The free-threaded GC uses mimallocs segment thread IDs to restore the overwritten `ob_tid` thread ids in PyObjects. For that reason, it's important that PyObjects and mimalloc use the same identifiers.
* gh-115041: Add wrappers that are atomic only in free-threaded builds (#115046)mpage2024-02-144-0/+40
| | | | | | These are intended to be used in places where atomics are required in free-threaded builds but not in the default build. We don't want to introduce the potential performance overhead of an atomic operation in the default build.
* Add myself to various CODEOWNERS (GH-115481)Ken Jin2024-02-141-0/+2
|
* gh-112302: Move pip SBOM discovery to release-tools (#115360)Seth Michael Larson2024-02-142-921/+0
|
* Docs: spell out sentence about ndbm/gdbm file formats (#115470)Erlend E. Aasland2024-02-141-6/+8
|
* gh-115441: Fix missing braces warning (#115460)Sam Gross2024-02-141-11/+0
| | | Removes `_py_object_state_INIT`. We want to initialize the `object_state` field to zero.