]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
8 months agogh-125331: Allow the parser to activate future imports on the fly (#125482)
Pablo Galindo Salgado [Fri, 14 Feb 2025 04:54:56 +0000 (04:54 +0000)] 
gh-125331: Allow the parser to activate future imports on the fly (#125482)

8 months agoGH-115869: Don't JIT zeroed bytes (GH-130023)
Brandt Bucher [Thu, 13 Feb 2025 18:51:03 +0000 (10:51 -0800)] 
GH-115869: Don't JIT zeroed bytes (GH-130023)

8 months agoFix a typo in `_localemodule.c` (GH-130085)
Bartosz Sławecki [Thu, 13 Feb 2025 17:29:26 +0000 (18:29 +0100)] 
Fix a typo in `_localemodule.c` (GH-130085)

8 months agogh-128130: Fix unhandled keyboard interrupt data race (gh-129975)
Sam Gross [Thu, 13 Feb 2025 17:29:03 +0000 (12:29 -0500)] 
gh-128130: Fix unhandled keyboard interrupt data race (gh-129975)

Use an atomic operation when setting
`_PyRuntime.signals.unhandled_keyboard_interrupt`. We now only clear the
variable at the start of `_PyRun_Main`, which is the same function where
we check it.

This avoids race conditions where previously another thread might call
`run_eval_code_obj()` and erroneously clear the unhandled keyboard
interrupt.

8 months agoRevert "gh-130048: Reintroduce full LTO as default on Clang (GH-130049)" (#130088)
Ken Jin [Thu, 13 Feb 2025 17:27:19 +0000 (01:27 +0800)] 
Revert "gh-130048: Reintroduce full LTO as default on Clang (GH-130049)" (#130088)

This reverts commit 34c06ccc4c6c21935b46302935f3df24b00daa2c.

8 months agogh-129984: Mark immortal objects as deferred (#129985)
Dino Viehland [Thu, 13 Feb 2025 17:01:43 +0000 (09:01 -0800)] 
gh-129984: Mark immortal objects as deferred (#129985)

Mark immortal objects as deferred

8 months agogh-130019: Fix data race in _PyType_AllocNoTrack (gh-130058)
Sam Gross [Thu, 13 Feb 2025 16:50:45 +0000 (11:50 -0500)] 
gh-130019: Fix data race in _PyType_AllocNoTrack (gh-130058)

The reference count fields, such as `ob_tid` and `ob_ref_shared`, may be
accessed concurrently in the free threading build by a `_Py_TryXGetRef`
or similar operation. The PyObject header fields will be initialized by
`_PyObject_Init`, so only call `memset()` to zero-initialize the remainder
of the allocation.

8 months agono-issue: Add free-threading build for TC dispatch (gh-130083)
Donghee Na [Thu, 13 Feb 2025 15:25:40 +0000 (00:25 +0900)] 
no-issue: Add free-threading build for TC dispatch (gh-130083)

no-issue: Add free-threading build for TCO dispatch

8 months agogh-130048: Reintroduce full LTO as default on Clang (GH-130049)
Ken Jin [Thu, 13 Feb 2025 14:06:00 +0000 (22:06 +0800)] 
gh-130048: Reintroduce full LTO as default on Clang (GH-130049)

8 months agoGH-107956: install build-details.json (PEP 739) (#130069)
Filipe Laíns 🇵🇸 [Thu, 13 Feb 2025 13:58:00 +0000 (13:58 +0000)] 
GH-107956: install build-details.json (PEP 739) (#130069)

8 months agogh-126835: Move const folding of lists & sets from ast_opt.c to flowgraph.c (#130032)
Yan Yanchii [Thu, 13 Feb 2025 12:11:07 +0000 (13:11 +0100)] 
gh-126835: Move const folding of lists & sets from ast_opt.c to flowgraph.c (#130032)

8 months agogh-128002: optimistically remove tasks from linked list when finished (#129995)
Kumar Aditya [Thu, 13 Feb 2025 07:49:53 +0000 (13:19 +0530)] 
gh-128002: optimistically remove tasks from linked list when finished  (#129995)

8 months agogh-130025: Correct handling of symlinks during iOS testbed framework installation...
Russell Keith-Magee [Thu, 13 Feb 2025 06:03:43 +0000 (14:03 +0800)] 
gh-130025: Correct handling of symlinks during iOS testbed framework installation. (#130026)

Correct handling of symlinks during iOS testbed framework installation.

8 months agoGH-127432: add cross-build-linux as a required CI job (#129459)
Filipe Laíns 🇵🇸 [Thu, 13 Feb 2025 02:41:13 +0000 (02:41 +0000)] 
GH-127432: add cross-build-linux as a required CI job (#129459)

8 months agogh-96092: Fix traceback.walk_stack(None) skipping too many frames (#129330)
Ammar Askar [Thu, 13 Feb 2025 01:43:09 +0000 (20:43 -0500)] 
gh-96092: Fix traceback.walk_stack(None) skipping too many frames (#129330)

As it says in its documentation, walk_stack was meant to just
follow `f.f_back` like other functions in the traceback module.
Instead it was previously doing `f.f_back.f_back` and then this
changed to `f_back.f_back.f_back.f_back' in Python 3.11 breaking
its behavior for external users.

This happened because the walk_stack function never really had
any good direct tests and its only consumer in the traceback module was
`extract_stack` which passed the result into `StackSummary.extract`.
As a generator, it was previously capturing the state of the stack
when it was first iterated over, rather than the stack when `walk_stack`
was called. Meaning when called inside the two method deep
`extract` and `extract_stack` calls, two `f_back`s were needed.
When 3.11 modified the sequence of calls in `extract`, two more
`f_back`s were needed to make the tests happy.

This changes the generator to capture the stack when `walk_stack` is
called, rather than when it is first iterated over. Since this is
technically a breaking change in behavior, there is a versionchanged
to the documentation. In practice, this is unlikely to break anyone,
you would have been needing to store the result of `walk_stack` and
expecting it to change.

8 months agogh-88535: Improve syntax error for wrongly closed strings (#26633)
Pablo Galindo Salgado [Thu, 13 Feb 2025 01:30:20 +0000 (01:30 +0000)] 
gh-88535: Improve syntax error for wrongly closed strings (#26633)

8 months agogh-116042: Fix location for SyntaxErrors of invalid escapes in the tokenizer (#116049)
Pablo Galindo Salgado [Thu, 13 Feb 2025 01:07:37 +0000 (01:07 +0000)] 
gh-116042: Fix location for SyntaxErrors of invalid escapes in the tokenizer (#116049)

8 months agoGH-91048: Correct error path in testexternalinspection (#129557)
Pablo Galindo Salgado [Thu, 13 Feb 2025 01:07:01 +0000 (01:07 +0000)] 
GH-91048: Correct error path in testexternalinspection (#129557)

8 months agogh-129693: Suppress `SyntaxWarning` in test_fstring (#129830)
Tomas R. [Thu, 13 Feb 2025 00:38:28 +0000 (01:38 +0100)] 
gh-129693: Suppress `SyntaxWarning` in test_fstring (#129830)

Suppress SyntaxWarning in test_fstring

8 months agogh-130030: Fix crash on 32-bit Linux with free threading (gh-130043)
Sam Gross [Wed, 12 Feb 2025 23:09:15 +0000 (18:09 -0500)] 
gh-130030: Fix crash on 32-bit Linux with free threading (gh-130043)

The `gc_get_refs` assertion needs to be after we check the alive and
unreachable bits. Otherwise, `ob_tid` may store the actual thread id
instead of the computed `gc_refs`, which may trigger the assertion if
the `ob_tid` looks like a negative value.

Also fix a few type warnings on 32-bit systems.

8 months ago gh-129912: Fix references to `Py_TPFLAGS_MANAGED_DICT` (gh-130044)
Satyam Kumar [Wed, 12 Feb 2025 22:48:14 +0000 (04:18 +0530)] 
 gh-129912: Fix references to `Py_TPFLAGS_MANAGED_DICT` (gh-130044)

8 months agogh-130050: Fix memory leaks in _testexternalinspection (#130051)
Sergey Miryanov [Wed, 12 Feb 2025 21:12:07 +0000 (13:12 -0800)] 
gh-130050: Fix memory leaks in _testexternalinspection (#130051)

8 months agogh-129819: Allow tier2/JIT and tailcall (GH-129820)
Ken Jin [Wed, 12 Feb 2025 18:18:36 +0000 (02:18 +0800)] 
gh-129819: Allow tier2/JIT and tailcall (GH-129820)

8 months agoGH-129715: Don't project traces that return to an unknown caller (GH-130024)
Brandt Bucher [Wed, 12 Feb 2025 18:16:43 +0000 (10:16 -0800)] 
GH-129715: Don't project traces that return to an unknown caller (GH-130024)

8 months agoGH-128682: Account for escapes in `DECREF_INPUTS` (GH-129953)
Mark Shannon [Wed, 12 Feb 2025 17:44:59 +0000 (17:44 +0000)] 
GH-128682: Account for escapes in `DECREF_INPUTS` (GH-129953)

* Handle escapes in DECREF_INPUTS

* Mark a few more functions as escaping

* Replace DECREF_INPUTS with PyStackRef_CLOSE where possible

8 months agogh-109798: Normalize `_datetime` and `datetime` error messages (#127345)
donBarbos [Wed, 12 Feb 2025 14:54:22 +0000 (18:54 +0400)] 
gh-109798: Normalize `_datetime` and `datetime` error messages (#127345)

Updates error messages in datetime and makes them consistent between Python and C.

---------

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
8 months agogh-128759: Fix accesses to `tp_version_tag`. (GH-129750)
Sam Gross [Wed, 12 Feb 2025 14:34:40 +0000 (09:34 -0500)] 
gh-128759: Fix accesses to `tp_version_tag`. (GH-129750)

We should use a relaxed atomic load in the free threading build in
`PyType_Modified()` because that's called without the type lock held.
It's not necessary to use atomics in `type_modified_unlocked()`.

We should also use `FT_ATOMIC_STORE_UINT_RELAXED()` instead of the
`UINT32` variant because `tp_version_tag` is declared as `unsigned int`.

8 months agogh-129983: fix data race in compile_template in sre.c (#130015)
Tomasz Pytel [Wed, 12 Feb 2025 13:04:44 +0000 (08:04 -0500)] 
gh-129983: fix data race in compile_template in sre.c (#130015)

8 months agogh-129889: Support context manager protocol by contextvars.Token (#129888)
Andrew Svetlov [Wed, 12 Feb 2025 11:32:58 +0000 (12:32 +0100)] 
gh-129889: Support context manager protocol by contextvars.Token (#129888)

8 months agoUpdate manpage environment variables and command line arguments (#129623)
Stefano Rivera [Wed, 12 Feb 2025 11:00:35 +0000 (03:00 -0800)] 
Update manpage environment variables and command line arguments (#129623)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
8 months agogh-59149: Setup documentation for IDLE on Linux and add section in Editors (#130003)
Stan Ulbrych [Wed, 12 Feb 2025 08:16:56 +0000 (08:16 +0000)] 
gh-59149: Setup documentation for IDLE on Linux and add section in Editors (#130003)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
---------

Co-authored-by: Petr Viktorin <encukou@gmail.com>
8 months agogh-128446: Skip Windows CI for Unix build system changes (#128450)
Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) [Wed, 12 Feb 2025 01:53:29 +0000 (07:23 +0530)] 
gh-128446: Skip Windows CI for Unix build system changes (#128450)

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
8 months agogh-125746: Delay deprecated `zipimport.zipimporter.load_module` removal time to 3...
Wulian233 [Tue, 11 Feb 2025 23:59:09 +0000 (07:59 +0800)] 
gh-125746: Delay deprecated `zipimport.zipimporter.load_module` removal time to 3.15 (#125748)

8 months agogh-129967: Fix race condition in `repr(set)` (gh-129978)
Sam Gross [Tue, 11 Feb 2025 22:29:27 +0000 (17:29 -0500)] 
gh-129967: Fix race condition in `repr(set)` (gh-129978)

The call to `PySequence_List()` could temporarily unlock and relock the
set, allowing the items to be cleared and return the incorrect
notation `{}` for a empty set (it should be `set()`).

Co-authored-by: T. Wouters <thomas@python.org>
8 months agogh-128657: Skip test_get_builtin_constructor when running with --parallel-threads...
Sam Gross [Tue, 11 Feb 2025 21:59:36 +0000 (16:59 -0500)] 
gh-128657: Skip test_get_builtin_constructor when running with --parallel-threads (GH-130018)

The test modifies sys.modules and is not thread-safe.

8 months agogh-117657: Add test_thread_local_bytecode to TSAN tests (gh-129753)
Sam Gross [Tue, 11 Feb 2025 21:54:32 +0000 (16:54 -0500)] 
gh-117657: Add test_thread_local_bytecode to TSAN tests (gh-129753)

Skip `test_no_copies_if_tlbc_disabled` when run under TSAN for now
due to a data race on the adaptive counter (see gh-129752).

8 months agogh-117657: Enable test_opcache under TSAN (GH-129831)
Sam Gross [Tue, 11 Feb 2025 21:53:08 +0000 (16:53 -0500)] 
gh-117657: Enable test_opcache under TSAN (GH-129831)

Fix a few thread-safety bugs to enable test_opcache when run with TSAN:

 * Use relaxed atomics when clearing `ht->_spec_cache.getitem`
   (gh-115999)
 * Add temporary suppression for type slot modifications (gh-127266)
 * Use atomic load when reading `*dictptr`

8 months agoRemove trailing whitespace in Lib/pydoc_data/topics.py (#130014)
Sam Gross [Tue, 11 Feb 2025 21:28:28 +0000 (16:28 -0500)] 
Remove trailing whitespace in Lib/pydoc_data/topics.py (#130014)

8 months agogh-129244: Only remove the workaround when MSVC has the bugfix (#130011)
Michael Droettboom [Tue, 11 Feb 2025 19:49:42 +0000 (14:49 -0500)] 
gh-129244: Only remove the workaround when MSVC has the bugfix (#130011)

8 months agoMerge branch 'main' of https://github.com/python/cpython
Hugo van Kemenade [Tue, 11 Feb 2025 19:29:11 +0000 (21:29 +0200)] 
Merge branch 'main' of https://github.com/python/cpython

8 months agoPost 3.14.0a5
Hugo van Kemenade [Tue, 11 Feb 2025 19:26:52 +0000 (21:26 +0200)] 
Post 3.14.0a5

8 months agogh-97850: Update the deprecation warning of `importlib.abc.Loader.load_module` (GH...
Tomas R. [Tue, 11 Feb 2025 19:04:16 +0000 (20:04 +0100)] 
gh-97850: Update the deprecation warning of `importlib.abc.Loader.load_module` (GH-129855)

8 months agoPython 3.14.0a5 v3.14.0a5
Hugo van Kemenade [Tue, 11 Feb 2025 17:16:07 +0000 (19:16 +0200)] 
Python 3.14.0a5

8 months agogh-130004: Disable PGO for ceval.c on MSVC for default build (GH-130009)
Ken Jin [Tue, 11 Feb 2025 17:13:05 +0000 (01:13 +0800)] 
gh-130004: Disable PGO for ceval.c on MSVC for default build (GH-130009)

Disable PGO for ceval.c on MSVC on default build

8 months agogh-129980: Include test name in TSAN filename in multiprocess test runner (GH-129981)
Sam Gross [Tue, 11 Feb 2025 17:09:43 +0000 (12:09 -0500)] 
gh-129980: Include test name in TSAN filename in multiprocess test runner (GH-129981)

8 months agogh-130004: Revert commit 9e52e55 (GH-130005)
Ken Jin [Tue, 11 Feb 2025 15:23:58 +0000 (23:23 +0800)] 
gh-130004: Revert commit 9e52e55 (GH-130005)

Revert commit 9e52e55

8 months agogh-104400: pygettext: use an AST parser instead of a tokenizer (GH-104402)
Tomas R. [Tue, 11 Feb 2025 11:51:42 +0000 (12:51 +0100)] 
gh-104400: pygettext: use an AST parser instead of a tokenizer (GH-104402)

This greatly simplifies the code and fixes many corner cases.

8 months agogh-101100: Docs: Fix some typos in the document (#129988)
Yuki Kobayashi [Tue, 11 Feb 2025 11:06:32 +0000 (20:06 +0900)] 
gh-101100: Docs: Fix some typos in the document (#129988)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
8 months agogh-129939: Add darkmode support for difflib's comparison pages (#129940)
Wulian233 [Tue, 11 Feb 2025 08:58:57 +0000 (16:58 +0800)] 
gh-129939: Add darkmode support for difflib's comparison pages (#129940)

8 months agogh-129928: Rework sqlite3 error helpers (#129929)
Erlend E. Aasland [Tue, 11 Feb 2025 07:49:25 +0000 (08:49 +0100)] 
gh-129928: Rework sqlite3 error helpers (#129929)

Add a helper for raising DB-API compatible exceptions based on the
result code of SQLite C APIs. Some APIs do not store the error indicator
on the database pointer, so we need to be able to deduce the DB-API
compatible exception directly from the error code.

- rename _pysqlite_seterror() as set_error_from_db()
- introduce set_error_from_code()

8 months agogh-129928: Raise more accurate exception for incorrect sqlite3 UDF creation (#129941)
Erlend E. Aasland [Tue, 11 Feb 2025 07:26:01 +0000 (08:26 +0100)] 
gh-129928: Raise more accurate exception for incorrect sqlite3 UDF creation (#129941)

Consistently raise ProgrammingError if the user tries to create an UDF
with an invalid number of parameters.

8 months agogh-91132: Update macOS installer to use ncurses 6.5. (#129990)
Ned Deily [Tue, 11 Feb 2025 04:48:12 +0000 (23:48 -0500)] 
gh-91132: Update macOS installer to use ncurses 6.5. (#129990)

8 months agogh-123299: Copyedit "What's New in Python 3.14" (#129970)
Hugo van Kemenade [Mon, 10 Feb 2025 21:46:36 +0000 (23:46 +0200)] 
gh-123299: Copyedit "What's New in Python 3.14" (#129970)

8 months agoClarify baseline for new interpreter (GH-129972)
Ken Jin [Mon, 10 Feb 2025 19:07:24 +0000 (03:07 +0800)] 
Clarify baseline for new interpreter (GH-129972)

8 months agogh-46236: Document `PyUnicode_DecodeCodePageStateful` (GH-127934)
Yuki Kobayashi [Mon, 10 Feb 2025 16:17:37 +0000 (01:17 +0900)] 
gh-46236: Document `PyUnicode_DecodeCodePageStateful` (GH-127934)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
8 months agogh-127712: Fix `secure` argument of `logging.handlers.SMTPHandler` (GH-127726)
s-hamann [Mon, 10 Feb 2025 12:34:27 +0000 (12:34 +0000)] 
gh-127712: Fix `secure` argument of `logging.handlers.SMTPHandler` (GH-127726)

GH-127712: Fix `secure` argument of `logging.handlers.SMTPHandler`

Python 3.12 removed support for the `keyfile` and `certfile` parameters
in `smtplib.SMTP.starttls()`, requiring a `ssl.SSLContext` instead.
`SMTPHandler` now creates a context from the `secure` tuple and passes
that to `starttls`.

8 months agogh-129289: fix crash when task finalizer is not called in asyncio (#129840)
Kumar Aditya [Mon, 10 Feb 2025 11:33:59 +0000 (17:03 +0530)] 
gh-129289: fix crash when task finalizer is not called in asyncio (#129840)

8 months agogh-129143: Fix incorrect documentation for logging.Handler.close(). (GH-129950)
Vinay Sajip [Mon, 10 Feb 2025 11:13:52 +0000 (11:13 +0000)] 
gh-129143: Fix incorrect documentation for logging.Handler.close(). (GH-129950)

8 months agogh-129583: update bundled pip to 25.0.1 (#129909)
Stéphane Bidoul [Mon, 10 Feb 2025 10:21:04 +0000 (11:21 +0100)] 
gh-129583: update bundled pip to 25.0.1 (#129909)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
8 months agogh-111178: fix UBSan failures in `Modules/_dbmmodule.c` (#129775)
Bénédikt Tran [Mon, 10 Feb 2025 10:02:47 +0000 (11:02 +0100)] 
gh-111178: fix UBSan failures in `Modules/_dbmmodule.c` (#129775)

This fixes UBSan failures for `dbmobject`.

In addition, we perform some minor cleanup changes such as renaming
some `args` parameter to `dummy` in some `METH_NOARGS` methods and
suppressing an unused return value in `_dbm_module_free`.

8 months agogh-126554: correct detection of `gcc` for `TestNullDlsym.test_null_dlsym` (GH-129872)
Peter Marko [Mon, 10 Feb 2025 09:51:56 +0000 (10:51 +0100)] 
gh-126554: correct detection of `gcc` for `TestNullDlsym.test_null_dlsym` (GH-129872)

In case gcc is not available, the test will fail with FileNotFoundError.
So catch the exception to skip the test correctly.

Signed-off-by: Peter Marko <peter.marko@siemens.com>
8 months agogh-128002: add fast path for native tasks in `asyncio.all_tasks` (#129943)
Kumar Aditya [Mon, 10 Feb 2025 09:34:33 +0000 (15:04 +0530)] 
gh-128002: add fast path for native tasks in `asyncio.all_tasks` (#129943)

8 months agogh-128002: simplify `asyncio.all_tasks` to use `PyList_Extend` instead of manual...
Kumar Aditya [Mon, 10 Feb 2025 08:56:32 +0000 (14:26 +0530)] 
gh-128002: simplify `asyncio.all_tasks` to use `PyList_Extend` instead of manual iteration (#129942)

8 months agoFix typo in 3.14 `pdb` whatsnew entry (#129886)
Victorien [Mon, 10 Feb 2025 06:17:05 +0000 (07:17 +0100)] 
Fix typo in 3.14 `pdb` whatsnew entry (#129886)

8 months agogh-68400: Remove outdated 2.7 comment (#129919)
Stan Ulbrych [Mon, 10 Feb 2025 04:53:32 +0000 (04:53 +0000)] 
gh-68400: Remove outdated 2.7 comment (#129919)

8 months agogh-129603: Don't segfault if sqlite3.Row description is None (#129604)
Erlend E. Aasland [Sun, 9 Feb 2025 23:27:28 +0000 (00:27 +0100)] 
gh-129603: Don't segfault if sqlite3.Row description is None (#129604)

8 months agoFix typo in `enum` documentation (#129920)
Victorien [Sun, 9 Feb 2025 21:48:11 +0000 (22:48 +0100)] 
Fix typo in `enum` documentation (#129920)

8 months agogh-129870: Skip test_dump_virtual_tables if SQLite lacks FTS4 support (#129913)
Erlend E. Aasland [Sun, 9 Feb 2025 20:43:23 +0000 (21:43 +0100)] 
gh-129870: Skip test_dump_virtual_tables if SQLite lacks FTS4 support (#129913)

8 months agogh-126835: Make CFG optimizer skip over NOP's when looking for const sequence constru...
Yan Yanchii [Sun, 9 Feb 2025 18:00:41 +0000 (19:00 +0100)] 
gh-126835: Make CFG optimizer skip over NOP's when looking for const sequence construction (#129703)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
8 months agoTrigger tail call CI on more files (GH-129906)
Ken Jin [Sun, 9 Feb 2025 16:52:58 +0000 (00:52 +0800)] 
Trigger tail call CI on more files (GH-129906)

8 months agogh-129892: Doc: Remove unnecessary role directive in graphlib.py (#129896)
Nikola Savic [Sun, 9 Feb 2025 15:22:57 +0000 (16:22 +0100)] 
gh-129892: Doc: Remove unnecessary role directive in graphlib.py (#129896)

Change `:exec:ValueError` to `ValueError` in `TopologicalSorter.done()` docstring

8 months agogh-129874: improve test_events to use correct task implementation (#129891)
Kumar Aditya [Sun, 9 Feb 2025 13:06:16 +0000 (18:36 +0530)] 
gh-129874: improve test_events to use correct task implementation (#129891)

8 months agogh-129874: improve `test_tasks` in asyncio to use correct internal functions (#129890)
Kumar Aditya [Sun, 9 Feb 2025 13:02:11 +0000 (18:32 +0530)] 
gh-129874: improve `test_tasks` in asyncio to use correct internal functions (#129890)

8 months agogh-129874: improve asyncio tests to use correct internal functions (#129887)
Kumar Aditya [Sun, 9 Feb 2025 12:05:39 +0000 (17:35 +0530)] 
gh-129874: improve asyncio tests to use correct internal functions  (#129887)

8 months agoGH-125413: Move `pathlib.Path.copy()` implementation alongside `Path.info` (#129856)
Barney Gale [Sun, 9 Feb 2025 12:05:23 +0000 (12:05 +0000)] 
GH-125413: Move `pathlib.Path.copy()` implementation alongside `Path.info` (#129856)

Move pathlib's private `CopyReader`, `LocalCopyReader`, `CopyWriter` and
`LocalCopyWriter` classes into `pathlib._os`, where they can live alongside
the low-level copying functions (`copyfileobj()` etc) and high-level path
querying interface (`PathInfo`).

This sets the stage for merging `LocalCopyReader` into `PathInfo`.

No change of behaviour; just moving some code around.

8 months agogh-129874: avoid mixing pure python and C implementation of asyncio (#129875)
Kumar Aditya [Sun, 9 Feb 2025 10:27:00 +0000 (15:57 +0530)] 
gh-129874: avoid mixing pure python and C implementation of asyncio (#129875)

8 months agogh-129873: IDLE: Improve help.py's method of parsing HTML (#129859)
Stan Ulbrych [Sun, 9 Feb 2025 08:17:35 +0000 (08:17 +0000)] 
gh-129873: IDLE: Improve help.py's method of parsing HTML (#129859)

In `help.copy_strip`, only copy the text `<section>`.  In `help.HelpParser.handle_starttag` and elsewhere, remove code to skip the no longer present html.  Add a reminder at the top of idle.rst to run copy_strip after changes.
---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
8 months agogh-129876: Initial 3.14 News3.txt entries (#129881)
Terry Jan Reedy [Sun, 9 Feb 2025 07:24:34 +0000 (02:24 -0500)] 
gh-129876: Initial 3.14 News3.txt entries (#129881)

8 months agogh-112953: Update news to finish 3.13 as main (#129877)
Terry Jan Reedy [Sun, 9 Feb 2025 06:13:43 +0000 (01:13 -0500)] 
gh-112953: Update news to finish 3.13 as main (#129877)

Entry for patch to 3.13.rc3

8 months agoProvide curframe_locals for backward compatibility but deprecate it (#125951)
Tian Gao [Sat, 8 Feb 2025 23:35:28 +0000 (18:35 -0500)] 
Provide curframe_locals for backward compatibility but deprecate it (#125951)

8 months agogh-128657: Run test_hashlib with `--parallel-threads` (GH-129833)
Sam Gross [Sat, 8 Feb 2025 20:12:21 +0000 (15:12 -0500)] 
gh-128657: Run test_hashlib with `--parallel-threads` (GH-129833)

* gh-128657: Run test_hashlib with `--parallel-threads`

This catches the race in `py_digest_by_name` that is fixed separately
in gh-128886.

* Adjust assertion order

8 months agogh-64414: mention AF_INET6 and IPv6 in socketserver docs. (#129866)
Gregory P. Smith [Sat, 8 Feb 2025 20:06:28 +0000 (12:06 -0800)] 
gh-64414: mention AF_INET6 and IPv6 in socketserver docs. (#129866)

mention AF_INET6 and IPv6 in socketserver docs.

8 months agoDocs: more explanation of the implications of new tail-call interpreter (GH-129863)
Ned Batchelder [Sat, 8 Feb 2025 19:28:35 +0000 (12:28 -0700)] 
Docs: more explanation of the implications of new tail-call interpreter (GH-129863)

Co-authored-by: Ken Jin <kenjin4096@gmail.com>
8 months agogh-129699: Add description to IDLE doc title (#129727)
Stan Ulbrych [Sat, 8 Feb 2025 19:26:07 +0000 (19:26 +0000)] 
gh-129699: Add description to IDLE doc title (#129727)

Also extend the 'idlelib' section header. These additions affect both the displayed idle.html file and the contents.html file displayed by clicking the Complete table of contents link on the main docs.python.org page. (The module index entries are generated from the module name and synopsis within module files.)
---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
8 months agogh-128317: Move CLI calendar highlighting to private class (#129625)
Hugo van Kemenade [Sat, 8 Feb 2025 15:56:57 +0000 (17:56 +0200)] 
gh-128317: Move CLI calendar highlighting to private class (#129625)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
8 months agogh-129173: Use `_PyUnicodeError_GetParams` in `PyCodec_NameReplaceErrors` (GH-129135)
Bénédikt Tran [Sat, 8 Feb 2025 15:01:57 +0000 (16:01 +0100)] 
gh-129173: Use `_PyUnicodeError_GetParams` in `PyCodec_NameReplaceErrors` (GH-129135)

8 months agogh-115806: Don't mangle gdbm header dependency detection output (#129390)
Erlend E. Aasland [Sat, 8 Feb 2025 14:38:11 +0000 (15:38 +0100)] 
gh-115806: Don't mangle gdbm header dependency detection output (#129390)

Replace AC_CACHE_VAL/AC_CHECK_HEADER with a cleaner variant using
AC_CACHE_CHECK/AC_PREPROC_IFELSE.

The former would produce garbled output when config.cache was reused. It
also required directly manipulating GNU Autoconf cache variables.

8 months agogh-111178: fix UBSan failures in `Objects/frameobject.c` (GH-129777)
Bénédikt Tran [Sat, 8 Feb 2025 13:54:34 +0000 (14:54 +0100)] 
gh-111178: fix UBSan failures in `Objects/frameobject.c` (GH-129777)

fix UBSan failures for `PyFrameObject`, `PyFrameLocalsProxyObject`

8 months agogh-111178: fix UBSan failures in `Objects/floatobject.c` (GH-129776)
Bénédikt Tran [Sat, 8 Feb 2025 13:47:19 +0000 (14:47 +0100)] 
gh-111178: fix UBSan failures in `Objects/floatobject.c` (GH-129776)

fix UBSan failures for `PyFloatObject`

8 months agogh-111178: fix UBSan failures in `Modules/arraymodule.c` (GH-129772)
Bénédikt Tran [Sat, 8 Feb 2025 13:26:14 +0000 (14:26 +0100)] 
gh-111178: fix UBSan failures in `Modules/arraymodule.c` (GH-129772)

* fix UBSan failures for `arrayobject`, `arrayiterobject`
* suppress unused return values

8 months agogh-111178: fix UBSan failures in `Modules/_io/*.c` (GH-129083)
Bénédikt Tran [Sat, 8 Feb 2025 13:21:32 +0000 (14:21 +0100)] 
gh-111178: fix UBSan failures in `Modules/_io/*.c` (GH-129083)

* fix UBSan failures for `buffered`, `rwpair`, `bytesio`, `bytesiobuf`, `iobase`, `stringio`, `nldecoder_object`, `textio`, `winconsoleio`

* arg names: use 'dummy' for NOARGS method and 'args' for others

8 months agogh-119349: Add ctypes.util.dllist -- list loaded shared libraries (GH-122946)
Brian Ward [Sat, 8 Feb 2025 13:02:36 +0000 (08:02 -0500)] 
gh-119349: Add ctypes.util.dllist -- list loaded shared libraries (GH-122946)

Add function to list the currently loaded libraries to ctypes.util

The dllist() function calls platform-specific APIs in order to
list the runtime libraries loaded by Python and any imported modules.
On unsupported platforms the function may be missing.

Co-authored-by: Eryk Sun <eryksun@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
8 months agogh-129842: warnings.py: Remove obsolete requirement reference (GH-129845)
Stan Ulbrych [Sat, 8 Feb 2025 12:57:17 +0000 (12:57 +0000)] 
gh-129842: warnings.py: Remove obsolete requirement reference (GH-129845)

8 months agoUse ubuntu-22.04-arm image for Arm runners. (#129834)
Diego Russo [Sat, 8 Feb 2025 06:56:19 +0000 (06:56 +0000)] 
Use ubuntu-22.04-arm image for Arm runners. (#129834)

GitHub suggested us to try the 22.04 images for the Arm runners while
they are invetigating the failures we've been having using 24.04.

8 months agoGH-129835: Yield path with trailing slash from `ReadablePath.glob('')` (#129836)
Barney Gale [Sat, 8 Feb 2025 06:47:09 +0000 (06:47 +0000)] 
GH-129835: Yield path with trailing slash from `ReadablePath.glob('')` (#129836)

In the private pathlib ABCs, make `ReadablePath.glob('')` yield a path with
a trailing slash (if it yields anything at all). As a result, `glob()`
works similarly to `joinpath()` when given a non-magic pattern.

In the globbing implementation, we preemptively add trailing slashes to
intermediate paths if there are pattern parts remaining; this removes the
need to check for existing trailing slashes (in the removed `add_slash()`
method) at subsequent steps.

8 months agogh-128657: fix _hashopenssl ref/data race (GH-128886)
Tomasz Pytel [Sat, 8 Feb 2025 02:47:45 +0000 (21:47 -0500)] 
gh-128657: fix _hashopenssl ref/data race (GH-128886)

8 months agogh-124703: Add documentation and whatsnew entry for pdb exit change (#129818)
Tian Gao [Sat, 8 Feb 2025 02:02:46 +0000 (21:02 -0500)] 
gh-124703: Add documentation and whatsnew entry for pdb exit change (#129818)

8 months agoGH-125413: Add `pathlib.Path.info` attribute (#127730)
Barney Gale [Sat, 8 Feb 2025 01:16:45 +0000 (01:16 +0000)] 
GH-125413: Add `pathlib.Path.info` attribute (#127730)

Add `pathlib.Path.info` attribute, which stores an object implementing the `pathlib.types.PathInfo` protocol (also new). The object supports querying the file type and internally caching `os.stat()` results. Path objects generated by `Path.iterdir()` are initialised with status information from `os.DirEntry` objects, which is gleaned from scanning the parent directory.

The `PathInfo` protocol has four methods: `exists()`, `is_dir()`, `is_file()` and `is_symlink()`.

8 months agogh-100239: replace BINARY_SUBSCR & family by BINARY_OP with oparg NB_SUBSCR (#129700)
Irit Katriel [Fri, 7 Feb 2025 22:39:54 +0000 (22:39 +0000)] 
gh-100239: replace BINARY_SUBSCR & family by BINARY_OP with oparg NB_SUBSCR (#129700)

8 months agogh-129825: Skip test_faulthandler.test_register_chain under TSAN (gh-129827)
Sam Gross [Fri, 7 Feb 2025 22:35:59 +0000 (17:35 -0500)] 
gh-129825: Skip test_faulthandler.test_register_chain under TSAN (gh-129827)

The test hangs when run under TSAN due to an interaction between TSAN's
signal interception and our attempt to call the previous signal handler.