]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
9 months agogh-128998: Fix indentation of numbered list and literal block (#128999)
Rafael Fontenelle [Sat, 18 Jan 2025 20:52:30 +0000 (17:52 -0300)] 
gh-128998: Fix indentation of numbered list and literal block (#128999)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
9 months agogh-121542: Document trailing newline behavior in `set_content()` (#121543)
Peter Bierma [Sat, 18 Jan 2025 18:34:40 +0000 (13:34 -0500)] 
gh-121542: Document trailing newline behavior in `set_content()` (#121543)

Co-authored-by: Yizheng Meng <dev@rapidcow.org>
9 months agoPre-commit: Drop specific language version and bump hooks (#128801)
Peter Bierma [Sat, 18 Jan 2025 17:53:17 +0000 (12:53 -0500)] 
Pre-commit: Drop specific language version and bump hooks (#128801)

9 months agogh-128679: Skip test_tracemalloc_track_race() on debug build (#128988)
Victor Stinner [Sat, 18 Jan 2025 15:13:54 +0000 (16:13 +0100)] 
gh-128679: Skip test_tracemalloc_track_race() on debug build (#128988)

There is a race condition between PyMem_SetAllocator() and
PyMem_RawMalloc()/PyMem_RawFree(). While PyMem_SetAllocator() write
is protected by a lock, PyMem_RawMalloc()/PyMem_RawFree() reads are
not protected by a lock. PyMem_RawMalloc()/PyMem_RawFree() can be
called with an old context and the new function pointer.

On a release build, it's not an issue since the context is not used.
On a debug build, the debug hooks use the context and so can crash.

9 months agogh-59705: Make PYTHREAD_NAME_MAXLEN macro private (#128945)
Victor Stinner [Sat, 18 Jan 2025 15:10:29 +0000 (16:10 +0100)] 
gh-59705: Make PYTHREAD_NAME_MAXLEN macro private (#128945)

Rename PYTHREAD_NAME_MAXLEN to _PYTHREAD_NAME_MAXLEN.

9 months agogh-125997: suggest efficient alternatives for `time.sleep(0)` (#128752)
Bénédikt Tran [Sat, 18 Jan 2025 11:02:43 +0000 (12:02 +0100)] 
gh-125997: suggest efficient alternatives for `time.sleep(0)` (#128752)

9 months agogh-118761: Improve import time for `csv` (#128858)
Bénédikt Tran [Sat, 18 Jan 2025 10:45:18 +0000 (11:45 +0100)] 
gh-118761: Improve import time for `csv` (#128858)

This reduces the import time of the `csv` module by up to five times,
by importing `re` on demand.

In particular, the `re` module is no more implicitly exposed as `csv.re`.

9 months agogh-126349: Add 'fill', 'poly', and 'no_animation' context managers to turtle (#126350)
Marie Roald [Sat, 18 Jan 2025 10:27:22 +0000 (11:27 +0100)] 
gh-126349: Add 'fill', 'poly', and 'no_animation' context managers to turtle (#126350)

Co-authored-by: Marie Roald <roald.marie@gmail.com>
Co-authored-by: Yngve Mardal Moe <yngve.m.moe@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Daniel Hollas <danekhollas@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
9 months agogh-128961: Fix exhausted array iterator crash in __setstate__() (#128962)
Tomasz Pytel [Sat, 18 Jan 2025 09:55:29 +0000 (04:55 -0500)] 
gh-128961: Fix exhausted array iterator crash in __setstate__() (#128962)

9 months agogh-128515: Add BOLT build to CI (gh-128845)
Zanie Blue [Sat, 18 Jan 2025 07:32:23 +0000 (01:32 -0600)] 
gh-128515: Add BOLT build to CI (gh-128845)

9 months agogh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` sockets (GH-128933)
Michał Górny [Sat, 18 Jan 2025 00:49:16 +0000 (01:49 +0100)] 
gh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` sockets (GH-128933)

* gh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` sockets

Do not attempt to set ``SO_REUSEPORT`` on sockets of address familifies other
than ``AF_INET`` and ``AF_INET6``, as it is meaningless with these address
families, and the call with fail with Linux kernel 6.12.9 and newer.

* Apply suggestions from code review

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
---------

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
9 months agoFix definition of a `generator iterator` in `glossary.rst` (GH-128952)
Daniel F Moisset [Sat, 18 Jan 2025 00:46:19 +0000 (00:46 +0000)] 
Fix definition of a `generator iterator` in `glossary.rst` (GH-128952)

Fix possible typo/grammar in glossary.rst

As discussed in https://discuss.python.org/t/typo-in-glossary-entry-for-generator-iterator/77163

9 months agogh-128923: fix test_pydoc for object subclasses without `__module__` (#128951)
T. Wouters [Fri, 17 Jan 2025 22:43:17 +0000 (23:43 +0100)] 
gh-128923: fix test_pydoc for object subclasses without `__module__` (#128951)

Fix pydoc's docclass() for classes inheriting from object without the `__module__` attribute, like `_testcapi.HeapType`.

9 months agogh-128955: Fix goto if tlbc creation fails when throwing into a generator (#128957)
mpage [Fri, 17 Jan 2025 20:53:29 +0000 (12:53 -0800)] 
gh-128955: Fix goto if tlbc creation fails when throwing into a generator (#128957)

We don't have the correct copy of the bytecode and can't update next_instr
appropriately, so just unwind.

9 months agogh-128911: Add tests on the PyImport C API (#128915)
Victor Stinner [Fri, 17 Jan 2025 17:52:18 +0000 (18:52 +0100)] 
gh-128911: Add tests on the PyImport C API (#128915)

* Add Modules/_testlimitedcapi/import.c
* Add Lib/test/test_capi/test_import.py
* Remove _testcapi.check_pyimport_addmodule(): tests already covered
  by newly added tests.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
9 months agoRefactor code generators a bit (GH-128920)
Mark Shannon [Fri, 17 Jan 2025 16:59:30 +0000 (16:59 +0000)] 
Refactor code generators a bit (GH-128920)

Refactor code generators a bit to avoid passing stack property around all over the place

9 months agogh-128923: Use zero to indicate unassigned unique id (#128925)
Sam Gross [Fri, 17 Jan 2025 15:42:27 +0000 (10:42 -0500)] 
gh-128923: Use zero to indicate unassigned unique id (#128925)

In the free threading build, the per thread reference counting uses a
unique id for some objects to index into the local reference count
table. Use 0 instead of -1 to indicate that the id is not assigned. This
avoids bugs where zero-initialized heap type objects look like they have
a unique id assigned.

9 months agogh-58956: Fix a frame refleak in bdb (#128190)
Tian Gao [Fri, 17 Jan 2025 15:33:04 +0000 (10:33 -0500)] 
gh-58956: Fix a frame refleak in bdb (#128190)

9 months agogh-59705: Implement _thread.set_name() on Windows (#128675)
Victor Stinner [Fri, 17 Jan 2025 13:55:43 +0000 (14:55 +0100)] 
gh-59705: Implement _thread.set_name() on Windows (#128675)

Implement set_name() with SetThreadDescription() and _get_name() with
GetThreadDescription(). If SetThreadDescription() or
GetThreadDescription() is not available in kernelbase.dll, delete the
method when the _thread module is imported.

Truncate the thread name to 32766 characters.

Co-authored-by: Eryk Sun <eryksun@gmail.com>
9 months agoRevert "gh-128770: raise warnings as errors in test suite - except for test_socket...
Hugo van Kemenade [Fri, 17 Jan 2025 13:16:10 +0000 (15:16 +0200)] 
Revert "gh-128770: raise warnings as errors in test suite - except for test_socket which still logs warnings (#128726)" (#128936)

9 months agogh-58689: Fix os.kill() error handling on Windows (#128932)
Victor Stinner [Fri, 17 Jan 2025 12:30:40 +0000 (13:30 +0100)] 
gh-58689: Fix os.kill() error handling on Windows (#128932)

9 months agogh-128770: raise warnings as errors in test suite - except for test_socket which...
Thomas Grainger [Fri, 17 Jan 2025 11:39:16 +0000 (11:39 +0000)] 
gh-128770: raise warnings as errors in test suite - except for test_socket which still logs warnings (#128726)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Brett Cannon <brett@python.org>
9 months agogh-118761: Improve import time of `tomllib` (#128907)
Taneli Hukkinen [Fri, 17 Jan 2025 02:48:42 +0000 (04:48 +0200)] 
gh-118761: Improve import time of `tomllib` (#128907)

Improve import time of `tomllib`  (in sync with upstream)

9 months agoACKS: Add myself (#128924)
Stan Ulbrych [Fri, 17 Jan 2025 02:45:46 +0000 (02:45 +0000)] 
ACKS: Add myself (#128924)

9 months agoGH-126599: Remove the "counter" optimizer/executor (GH-126853)
Xuanteng Huang [Thu, 16 Jan 2025 23:57:04 +0000 (07:57 +0800)] 
GH-126599: Remove the "counter" optimizer/executor (GH-126853)

9 months agogh-121604: fix warnings in test_importlib.test_abc and test_importlib.test_windows...
Thomas Grainger [Thu, 16 Jan 2025 21:29:16 +0000 (21:29 +0000)] 
gh-121604: fix warnings in test_importlib.test_abc and test_importlib.test_windows (GH-128904)

9 months agoFix typo in doc (#128917)
Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) [Thu, 16 Jan 2025 16:32:17 +0000 (22:02 +0530)] 
Fix typo in doc (#128917)

9 months agogh-128910: Remove `_PyTrash_begin` and `_PyTrash_end` C-API functions (#128919)
sobolevn [Thu, 16 Jan 2025 15:41:40 +0000 (18:41 +0300)] 
gh-128910: Remove `_PyTrash_begin` and `_PyTrash_end` C-API functions (#128919)

9 months agogh-100239: specialize long tail of binary operations (#128722)
Irit Katriel [Thu, 16 Jan 2025 15:22:13 +0000 (15:22 +0000)] 
gh-100239: specialize long tail of binary operations (#128722)

9 months agogh-119786: added InternalDocs/generators.md (#128524)
Irit Katriel [Thu, 16 Jan 2025 13:15:52 +0000 (13:15 +0000)] 
gh-119786: added InternalDocs/generators.md (#128524)

9 months agogh-128679: Fix tracemalloc.stop() race conditions (#128893)
Victor Stinner [Thu, 16 Jan 2025 12:53:18 +0000 (13:53 +0100)] 
gh-128679: Fix tracemalloc.stop() race conditions (#128893)

tracemalloc_alloc(), tracemalloc_realloc(), tracemalloc_free(),
_PyTraceMalloc_TraceRef() and _PyTraceMalloc_GetMemory() now check
'tracemalloc_config.tracing' after calling TABLES_LOCK().

_PyTraceMalloc_TraceRef() now always returns 0.

9 months agogh-128017: Make a note that sys variables are read-only (#128887)
Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) [Thu, 16 Jan 2025 10:17:03 +0000 (15:47 +0530)] 
gh-128017: Make a note that sys variables are read-only (#128887)

9 months agogh-121604: fix ResourceLoader deprecation warning message (GH-128859)
Thomas Grainger [Wed, 15 Jan 2025 21:13:59 +0000 (21:13 +0000)] 
gh-121604: fix ResourceLoader deprecation warning message (GH-128859)

9 months agogh-128891: add specialized opcodes to opcode.opname (#128892)
Irit Katriel [Wed, 15 Jan 2025 21:02:32 +0000 (21:02 +0000)] 
gh-128891: add specialized opcodes to opcode.opname (#128892)

9 months agogh-97850: Suggest `TraversableResources` as the alternative for `ResourceLoader`...
Tomas R. [Wed, 15 Jan 2025 20:47:36 +0000 (21:47 +0100)] 
gh-97850: Suggest `TraversableResources` as the alternative for `ResourceLoader` (GH-128601)

Suggest TraversableResources as the alternative for ResourceLoader.

Previously, ResourceReader was the suggested alternative, but it
is itself deprecated in favour of TraversableResources.

9 months agogh-128679: Redesign tracemalloc locking (#128888)
Victor Stinner [Wed, 15 Jan 2025 20:22:44 +0000 (21:22 +0100)] 
gh-128679: Redesign tracemalloc locking (#128888)

* Use TABLES_LOCK() to protect 'tracemalloc_config.tracing'.
* Hold TABLES_LOCK() longer while accessing tables.
* tracemalloc_realloc() and tracemalloc_free() no longer
  remove the trace on reentrant call.
* _PyTraceMalloc_Stop() unregisters _PyTraceMalloc_TraceRef().
* _PyTraceMalloc_GetTraces() sets the reentrant flag.
* tracemalloc_clear_traces_unlocked() sets the reentrant flag.

9 months agogh-128807: Add marking phase for free-threaded cyclic GC (gh-128808)
Neil Schemenauer [Wed, 15 Jan 2025 19:27:28 +0000 (11:27 -0800)] 
gh-128807: Add marking phase for free-threaded cyclic GC (gh-128808)

9 months agogh-128016: Improved invalid escape sequence warning message (#128020)
Umar Butler [Wed, 15 Jan 2025 17:00:54 +0000 (04:00 +1100)] 
gh-128016: Improved invalid escape sequence warning message (#128020)

9 months agogh-128874: Fix the documentation for blurb 2.0 (#128875)
Victor Stinner [Wed, 15 Jan 2025 14:12:40 +0000 (15:12 +0100)] 
gh-128874: Fix the documentation for blurb 2.0 (#128875)

9 months agogh-128816: Fix warnings in test_doctest (GH-128817)
Thomas Grainger [Wed, 15 Jan 2025 13:05:59 +0000 (13:05 +0000)] 
gh-128816: Fix warnings in test_doctest (GH-128817)

* Fix a deprecation warning for using importlib.resources.abc.ResourceReader.
* Fix an import warning when importing readline (if it has not yet been imported).

9 months agoFix typo in `Lib/asyncio/futures.py` (#128819)
Wang Ran (汪然) [Wed, 15 Jan 2025 12:24:31 +0000 (20:24 +0800)] 
Fix typo in `Lib/asyncio/futures.py` (#128819)

9 months agogh-128438: Use `EnvironmentVarGuard` for `test_{builtin,io,locale}.py` (#128476)
Yan Yanchii [Wed, 15 Jan 2025 09:38:43 +0000 (10:38 +0100)] 
gh-128438: Use `EnvironmentVarGuard` for `test_{builtin,io,locale}.py` (#128476)

Modifying locale-related environment variables in `Lib/test/test_builtin.py`,
`Lib/test/test_io.py` and `Lib/test/test_locale.py` is now achieved by using
an `EnvironmentVarGuard` context instead of an explicit `try-finally` block.

9 months agogh-128473: Skip segfaulting `test_embed` tests when BOLT instrumented (gh-128474)
Zanie Blue [Wed, 15 Jan 2025 01:49:02 +0000 (19:49 -0600)] 
gh-128473: Skip segfaulting `test_embed` tests when BOLT instrumented (gh-128474)

* Skip segfaulting `test_embed` tests when BOLT instrumented

Co-authored-by: Gregory Szorc <gregory.szorc@gmail.com>
* NEWS

---------

Co-authored-by: Gregory Szorc <gregory.szorc@gmail.com>
9 months agogh-121604: Make sure all deprecated items in importlib raise DeprecationWarning ...
Tomas R. [Wed, 15 Jan 2025 00:48:46 +0000 (01:48 +0100)] 
gh-121604: Make sure all deprecated items in importlib raise DeprecationWarning (#128007)

Co-authored-by: rashansmith <smith.rashan@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Brett Cannon <brett@python.org>
9 months agogh-71339: Use new assertion methods in the multiprocessing tests (GH-128847)
Serhiy Storchaka [Tue, 14 Jan 2025 23:17:11 +0000 (01:17 +0200)] 
gh-71339: Use new assertion methods in the multiprocessing tests (GH-128847)

9 months agogh-71339: Use new assertion methods in test_logging (GH-128828)
Serhiy Storchaka [Tue, 14 Jan 2025 20:40:45 +0000 (22:40 +0200)] 
gh-71339: Use new assertion methods in test_logging (GH-128828)

9 months agogh-115999: Specialize `LOAD_ATTR` for instance and class receivers in free-threaded...
mpage [Tue, 14 Jan 2025 19:56:11 +0000 (11:56 -0800)] 
gh-115999: Specialize `LOAD_ATTR` for instance and class receivers in free-threaded builds (#128164)

Finish specialization for LOAD_ATTR in the free-threaded build by adding support for class and instance receivers.

9 months agogh-128384: Add locking to warnings.py. (gh-128386)
Neil Schemenauer [Tue, 14 Jan 2025 19:43:42 +0000 (11:43 -0800)] 
gh-128384: Add locking to warnings.py. (gh-128386)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
9 months agogh-67206: Document that `string.printable` is not printable in the POSIX sense (...
Bénédikt Tran [Tue, 14 Jan 2025 16:07:37 +0000 (17:07 +0100)] 
gh-67206: Document that `string.printable` is not printable in the POSIX sense (#128820)

9 months agogh-59705: Document OS thread name change (#128800)
Victor Stinner [Tue, 14 Jan 2025 15:31:13 +0000 (16:31 +0100)] 
gh-59705: Document OS thread name change (#128800)

9 months agogh-106320: Document replacement for removed C API (#128787)
Victor Stinner [Tue, 14 Jan 2025 15:29:21 +0000 (16:29 +0100)] 
gh-106320: Document replacement for removed C API (#128787)

9 months agoFix a "doctest" block in `Doc/library/turtle.rst` (#128831)
Rafael Fontenelle [Tue, 14 Jan 2025 15:17:24 +0000 (12:17 -0300)] 
Fix a "doctest" block in `Doc/library/turtle.rst` (#128831)

9 months agoMerge branch 'main' of https://github.com/python/cpython
Hugo van Kemenade [Tue, 14 Jan 2025 15:12:21 +0000 (17:12 +0200)] 
Merge branch 'main' of https://github.com/python/cpython

9 months agoPost 3.14.0a4
Hugo van Kemenade [Tue, 14 Jan 2025 15:10:53 +0000 (17:10 +0200)] 
Post 3.14.0a4

9 months agoGH-128682: Convert explicit loops closing arrays into `DECREF_INPUTS`. (GH-128822)
Mark Shannon [Tue, 14 Jan 2025 15:08:56 +0000 (15:08 +0000)] 
GH-128682: Convert explicit loops closing arrays into `DECREF_INPUTS`. (GH-128822)

* Mark Py_DECREF and Py_XDECREF as escaping

* Remove explicit loops for clearing array inputs

9 months agogh-118761: substitute `re` import in `base64.b16decode` for a more efficient alternat...
Bénédikt Tran [Tue, 14 Jan 2025 13:25:33 +0000 (14:25 +0100)] 
gh-118761: substitute `re` import in `base64.b16decode` for a more efficient alternative (#128736)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
9 months agogh-71339: Use new assertion methods in test_typing (GH-128825)
Serhiy Storchaka [Tue, 14 Jan 2025 13:19:32 +0000 (15:19 +0200)] 
gh-71339: Use new assertion methods in test_typing (GH-128825)

9 months agogh-71339: Use new assertion methods in test_sqlite3 (GH-128830)
Serhiy Storchaka [Tue, 14 Jan 2025 13:18:25 +0000 (15:18 +0200)] 
gh-71339: Use new assertion methods in test_sqlite3 (GH-128830)

9 months agoPython 3.14.0a4 v3.14.0a4
Hugo van Kemenade [Tue, 14 Jan 2025 11:41:39 +0000 (13:41 +0200)] 
Python 3.14.0a4

9 months agogh-118761: Improve import time of the `pickle` module. (#128732)
Bénédikt Tran [Tue, 14 Jan 2025 11:26:26 +0000 (12:26 +0100)] 
gh-118761: Improve import time of the `pickle` module. (#128732)

Importing `pickle` is now roughly 25% faster.

Importing the `re` module is no longer needed and
thus `re` is no more implicitly exposed as `pickle.re`.

---------

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
9 months agogh-109959: Skip test_glob.test_selflink() flaky test (#128812)
Victor Stinner [Tue, 14 Jan 2025 10:18:52 +0000 (11:18 +0100)] 
gh-109959: Skip test_glob.test_selflink() flaky test (#128812)

9 months agogh-127787: Move _PyUnicodeError_GetParams() to the internal C API (#128803)
Victor Stinner [Tue, 14 Jan 2025 10:17:20 +0000 (11:17 +0100)] 
gh-127787: Move _PyUnicodeError_GetParams() to the internal C API (#128803)

9 months agoUpdate cryptographic primitives code owners. (#128747)
Bénédikt Tran [Tue, 14 Jan 2025 09:16:43 +0000 (10:16 +0100)] 
Update cryptographic primitives code owners. (#128747)

9 months agogh-123299: Copyedit "What's New in Python 3.14" (#128814)
Hugo van Kemenade [Tue, 14 Jan 2025 08:53:03 +0000 (10:53 +0200)] 
gh-123299: Copyedit "What's New in Python 3.14" (#128814)

9 months agoSkip CI expensive checks on `CODEOWNERS` update (#128754)
Bénédikt Tran [Tue, 14 Jan 2025 08:40:59 +0000 (09:40 +0100)] 
Skip CI expensive checks on `CODEOWNERS` update (#128754)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
9 months agogh-71339: Add additional assertion methods for unittest (GH-128707)
Serhiy Storchaka [Tue, 14 Jan 2025 08:02:38 +0000 (10:02 +0200)] 
gh-71339: Add additional assertion methods for unittest (GH-128707)

Add the following methods:

* assertHasAttr() and assertNotHasAttr()
* assertIsSubclass() and assertNotIsSubclass()
* assertStartsWith() and assertNotStartsWith()
* assertEndsWith() and assertNotEndsWith()

Also improve error messages for assertIsInstance() and
assertNotIsInstance().

9 months agogh-106320: Document private C APIs promoted to public C API (#128788)
Victor Stinner [Tue, 14 Jan 2025 07:44:20 +0000 (08:44 +0100)] 
gh-106320: Document private C APIs promoted to public C API (#128788)

9 months agogh-125997: Increase test coverage for `time.sleep()` (#128751)
Bénédikt Tran [Mon, 13 Jan 2025 16:58:11 +0000 (17:58 +0100)] 
gh-125997: Increase test coverage for `time.sleep()` (#128751)

- Add tests for durations of invalid types.
- Add tests for `int` and `float` durations, including signed zeroes durations.
- Add tests for nonzero very small durations and durations close to the clock resolution.

---------

Co-authored-by: Victor Stinner <vstinner@python.org>
9 months agoExplicitly import `urllib.error` in `urllib.robotparser` (#128737)
Bénédikt Tran [Mon, 13 Jan 2025 16:14:59 +0000 (17:14 +0100)] 
Explicitly import `urllib.error` in `urllib.robotparser` (#128737)

9 months agogh-128562: Fix generation of the tkinter widget names (GH-128604)
Zhikang Yan [Mon, 13 Jan 2025 15:54:46 +0000 (23:54 +0800)] 
gh-128562: Fix generation of the tkinter widget names (GH-128604)

There were possible conflicts if the widget class name ends with a digit.

9 months agogh-128078: Use `PyErr_SetRaisedException` in `_PyGen_SetStopIterationValue` (#128287)
Bénédikt Tran [Mon, 13 Jan 2025 15:54:13 +0000 (16:54 +0100)] 
gh-128078: Use `PyErr_SetRaisedException` in `_PyGen_SetStopIterationValue` (#128287)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
9 months agogh-128002: add more thread safety tests for asyncio (#128480)
Kumar Aditya [Mon, 13 Jan 2025 15:36:55 +0000 (21:06 +0530)] 
gh-128002: add more thread safety tests for asyncio (#128480)

9 months agogh-128421: make getters and setters of `BaseException` thread safe (#128728)
Kumar Aditya [Mon, 13 Jan 2025 14:38:33 +0000 (20:08 +0530)] 
gh-128421: make getters and setters of `BaseException` thread safe (#128728)

9 months agogh-128400: Only show the current thread in `Py_FatalError` on the free-threaded build...
Peter Bierma [Mon, 13 Jan 2025 14:36:54 +0000 (09:36 -0500)] 
gh-128400: Only show the current thread in `Py_FatalError` on the free-threaded build (#128758)

9 months agogh-111178: fix UBSan failures in `Objects/codeobject.c` (GH-128240)
Bénédikt Tran [Mon, 13 Jan 2025 13:25:04 +0000 (14:25 +0100)] 
gh-111178: fix UBSan failures in `Objects/codeobject.c` (GH-128240)

9 months agogh-128182: Add per-object memory access synchronization to `ctypes` (GH-128490)
Peter Bierma [Mon, 13 Jan 2025 13:17:38 +0000 (08:17 -0500)] 
gh-128182: Add per-object memory access synchronization to `ctypes` (GH-128490)

9 months agogh-67748: DOC:Add summary table for str methods in stdtypes.rst (GH-1709)
Cheryl Sabella [Mon, 13 Jan 2025 13:14:59 +0000 (05:14 -0800)] 
gh-67748: DOC:Add summary table for str methods in stdtypes.rst (GH-1709)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
9 months agogh-127773: Disable attribute cache on incompatible MRO entries (GH-127924)
Petr Viktorin [Mon, 13 Jan 2025 13:10:41 +0000 (14:10 +0100)] 
gh-127773: Disable attribute cache on incompatible MRO entries (GH-127924)

9 months agogh-128078: Clear exception in `anext` before calling `_PyGen_SetStopIterationValue...
Bénédikt Tran [Mon, 13 Jan 2025 12:55:09 +0000 (13:55 +0100)] 
gh-128078: Clear exception in `anext` before calling `_PyGen_SetStopIterationValue` (#128780)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
9 months agoGH-128682: Stronger checking of `PyStackRef_CLOSE` and `DEAD`. (GH-128683)
Mark Shannon [Mon, 13 Jan 2025 12:37:48 +0000 (12:37 +0000)] 
GH-128682: Stronger checking of `PyStackRef_CLOSE` and `DEAD`. (GH-128683)

9 months agogh-128150: Improve performances of `uuid.uuid*` constructor functions. (#128151)
Bénédikt Tran [Mon, 13 Jan 2025 11:46:13 +0000 (12:46 +0100)] 
gh-128150: Improve performances of `uuid.uuid*` constructor functions. (#128151)

We introduce a private constructor `UUID._from_int()` for RFC 4122/9562 UUIDs,
which takes the integral UUID value as input. The latter must have correctly set
its variant and version bits. We also make `UUID.__init__()` slightly more efficient.

9 months agoGH-124483: Mark `Py_DECREF`, etc. as escaping for the JIT (GH-128678)
Mark Shannon [Mon, 13 Jan 2025 11:42:45 +0000 (11:42 +0000)] 
GH-124483: Mark `Py_DECREF`, etc. as escaping for the JIT (GH-128678)

9 months agogh-128595: Add test class helper to force no terminal colour (#128687)
Hugo van Kemenade [Mon, 13 Jan 2025 11:05:02 +0000 (13:05 +0200)] 
gh-128595: Add test class helper to force no terminal colour (#128687)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
9 months agoGH-128685: Specialize (rather than quicken) LOAD_CONST into LOAD_CONST_[IM]MORTAL...
Mark Shannon [Mon, 13 Jan 2025 10:30:28 +0000 (10:30 +0000)] 
GH-128685: Specialize (rather than quicken) LOAD_CONST into LOAD_CONST_[IM]MORTAL (GH-128708)

9 months agogh-123345: improve `fnmatch` docs (#123346)
Bénédikt Tran [Mon, 13 Jan 2025 10:21:22 +0000 (11:21 +0100)] 
gh-123345: improve `fnmatch` docs (#123346)

9 months agogh-128690: temporarily do not use test_embed in PGO profile builds (#128771)
Ned Deily [Mon, 13 Jan 2025 09:02:18 +0000 (04:02 -0500)] 
gh-128690: temporarily do not use test_embed in PGO profile builds (#128771)

Temporarily do not use test_embed in PGO profile builds until the problem with test_init_pyvenv_cfg failing in some configurations is resolved.

9 months agogh-90905: Allow cross-compilation on macOS (#128385)
Zanie Blue [Mon, 13 Jan 2025 08:38:28 +0000 (02:38 -0600)] 
gh-90905: Allow cross-compilation on macOS (#128385)

9 months agogh-128759: fix data race in `type_modified_unlocked` (#128764)
sobolevn [Mon, 13 Jan 2025 07:40:52 +0000 (10:40 +0300)] 
gh-128759: fix data race in `type_modified_unlocked` (#128764)

9 months agogh-128627: Emscripten: Use wasm-gc based call adaptor if available (#128628)
Hood Chatham [Sun, 12 Jan 2025 23:09:39 +0000 (00:09 +0100)] 
gh-128627: Emscripten: Use wasm-gc based call adaptor if available (#128628)

Replaces the trampoline mechanism in Emscripten with an implementation that uses a
recently added feature of wasm-gc instead of JS type reflection, when that feature is
available.

9 months agogh-128731: Fix ResourceWarning in robotparser.RobotFileParser.read() (GH-128733)
Serhiy Storchaka [Sun, 12 Jan 2025 13:14:46 +0000 (15:14 +0200)] 
gh-128731: Fix ResourceWarning in robotparser.RobotFileParser.read() (GH-128733)

9 months agogh-128717: Stop-the-world when setting the recursion limit (#128741)
Peter Bierma [Sun, 12 Jan 2025 13:04:30 +0000 (08:04 -0500)] 
gh-128717: Stop-the-world when setting the recursion limit (#128741)

9 months agogh-126703: Add freelist for `PyMethodObject` (#128594)
Pieter Eendebak [Sun, 12 Jan 2025 13:01:49 +0000 (14:01 +0100)] 
gh-126703: Add freelist for `PyMethodObject` (#128594)

9 months agogh-128734: Fix ResourceWarning in urllib tests (GH-128735) 128348/head
Serhiy Storchaka [Sun, 12 Jan 2025 10:53:17 +0000 (12:53 +0200)] 
gh-128734: Fix ResourceWarning in urllib tests (GH-128735)

9 months agogh-128729: Fix RuntimeWarning in test_unittest (GH-128730)
Serhiy Storchaka [Sun, 12 Jan 2025 10:22:43 +0000 (12:22 +0200)] 
gh-128729: Fix RuntimeWarning in test_unittest (GH-128730)

9 months agogh-128377: Skip `test_cmd_line.test_non_interactive_output_buffering` when `PYTHONUNB...
Yan Yanchii [Sun, 12 Jan 2025 08:27:28 +0000 (09:27 +0100)] 
gh-128377: Skip `test_cmd_line.test_non_interactive_output_buffering` when `PYTHONUNBUFFERED=1` (#128378)

The `test_cmd_line.test_non_interactive_output_buffering` test assumes a buffered `stdio`
without checking the `PYTHONUNBUFFERED` value. Instead of changing the environment
variable for the duration of the test, it is better to simply skip it.

9 months agoGH-128520: Divide pathlib ABCs into three classes (#128523)
Barney Gale [Sat, 11 Jan 2025 19:27:47 +0000 (19:27 +0000)] 
GH-128520: Divide pathlib ABCs into three classes (#128523)

In the private pathlib ABCs, rename `PurePathBase` to `JoinablePath`, and
split `PathBase` into `ReadablePath` and `WritablePath`. This improves the
API fit for read-only virtual filesystems.

The split of `PathBase` entails a similar split of `CopyWorker` (implements
copying) and the test cases in `test_pathlib_abc`.

In a later patch, we'll make `WritablePath` inherit directly from
`JoinablePath` rather than `ReadablePath`. For a couple of reasons,
this isn't quite possible yet.

9 months agogh-128438: Add `EnvironmentVarGuard` for `test_pdb.py` (#128522)
Yan Yanchii [Sat, 11 Jan 2025 16:19:29 +0000 (17:19 +0100)] 
gh-128438: Add `EnvironmentVarGuard` for `test_pdb.py` (#128522)

9 months agoMake the Python CLI error message style more consistent (GH-128129)
9cel [Sat, 11 Jan 2025 09:17:35 +0000 (05:17 -0400)] 
Make the Python CLI error message style more consistent (GH-128129)

9 months agogh-128696: Add arm64 to the get_platform return val description (#128701)
RUANG (James Roy) [Sat, 11 Jan 2025 01:03:12 +0000 (09:03 +0800)] 
gh-128696: Add arm64 to the get_platform return val description (#128701)

9 months agogh-128409: Document that pdb.post_mortem() accepts exceptions (#128410)
Adam Johnson [Fri, 10 Jan 2025 15:54:45 +0000 (15:54 +0000)] 
gh-128409: Document that pdb.post_mortem() accepts exceptions (#128410)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>