]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
8 months agoGH-131358: Add encoding alias cseuckr for euc_kr (#131370)
Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) [Wed, 19 Mar 2025 09:29:20 +0000 (14:59 +0530)] 
GH-131358: Add encoding alias cseuckr for euc_kr (#131370)

* Add encoding alias cseuckr for euc_kr

* Update Misc/NEWS.d/next/Library/2025-03-17-21-35-53.gh-issue-131358.YVZ6yo.rst

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
8 months agogh-131401: fix data race in `_PyErr_Restore` (#131406)
Kumar Aditya [Wed, 19 Mar 2025 09:05:47 +0000 (14:35 +0530)] 
gh-131401: fix data race in `_PyErr_Restore` (#131406)

8 months agogh-131417: Mention asyncio Future and Task in docs for generic classes list (#131422)
Andrew Svetlov [Wed, 19 Mar 2025 09:05:23 +0000 (10:05 +0100)] 
gh-131417: Mention asyncio Future and Task in docs for generic classes list (#131422)

Mention asyncio Future and Task in docs for generic classes list

8 months agoDocs: fix shell command formatting (#131310)
partev [Wed, 19 Mar 2025 07:42:47 +0000 (03:42 -0400)] 
Docs: fix shell command formatting (#131310)

replace "zypper in" with "zypper install" to avoid incorrect highlighting

8 months agogh-121468: Ensure PDB cleans up event loop policies after using asyncio. (#131388)
Russell Keith-Magee [Wed, 19 Mar 2025 00:33:31 +0000 (08:33 +0800)] 
gh-121468: Ensure PDB cleans up event loop policies after using asyncio. (#131388)

Adds teardown logic, plus a change to asyncio.run usage, to avoid warnings when
running the test suite single process.

8 months agoGH-126367: `url2pathname()`: handle NTFS alternate data streams (#131428)
Barney Gale [Tue, 18 Mar 2025 23:37:12 +0000 (23:37 +0000)] 
GH-126367: `url2pathname()`: handle NTFS alternate data streams (#131428)

Adjust `url2pathname()` to decode embedded colon characters in Windows
URIs, rather than bailing out with an `OSError`.

8 months agogh-124666: Improve thread cleanup in test_android (#131427)
Malcolm Smith [Tue, 18 Mar 2025 22:30:22 +0000 (22:30 +0000)] 
gh-124666: Improve thread cleanup in test_android (#131427)

Ensures that failures in test setup don't result in dangling threads.

8 months agogh-130914: Make graphlib.TopologicalSorter.prepare() idempotent (#131317)
Daniel Pope [Tue, 18 Mar 2025 21:28:00 +0000 (21:28 +0000)] 
gh-130914: Make graphlib.TopologicalSorter.prepare() idempotent (#131317)

Closes #130914: Make graphlib.TopologicalSorter.prepare() idempotent

Relax the rules so that `.prepare()` can be called multiple times, provided that no work has been passed out by `.get_ready()` yet.

8 months agogh-118915: Document `PY_MONITORING_IS_INSTRUMENTED_EVENT` (GH-128026)
Yuki Kobayashi [Tue, 18 Mar 2025 16:34:01 +0000 (01:34 +0900)] 
gh-118915: Document `PY_MONITORING_IS_INSTRUMENTED_EVENT` (GH-128026)

8 months agogh-114917: Fix typo in getaddrinfo emulation (#131413)
Max Bachmann [Tue, 18 Mar 2025 13:31:13 +0000 (14:31 +0100)] 
gh-114917: Fix typo in getaddrinfo emulation (#131413)

8 months agogh-131402: add HMAC-SHA3 NIST test cases (#131407)
Bénédikt Tran [Tue, 18 Mar 2025 12:57:15 +0000 (13:57 +0100)] 
gh-131402: add HMAC-SHA3 NIST test cases (#131407)

Add NIST [1] tests for `HMAC-SHA-3/{224,256,384,512}`.

[1]: https://csrc.nist.gov/Projects/cryptographic-standards-and-guidelines/example-values

8 months agogh-130080: fix warnings in tests (#131400)
Irit Katriel [Tue, 18 Mar 2025 12:33:46 +0000 (12:33 +0000)] 
gh-130080: fix warnings in tests (#131400)

8 months agogh-131261: expat/refresh.sh: Expand list of manual steps (GH-131359)
Petr Viktorin [Tue, 18 Mar 2025 12:17:43 +0000 (13:17 +0100)] 
gh-131261: expat/refresh.sh: Expand list of manual steps (GH-131359)

8 months agogh-121284: Fix email address header folding with parsed encoded-word (GH-122754)
Mike Edmunds [Tue, 18 Mar 2025 11:07:17 +0000 (04:07 -0700)] 
gh-121284: Fix email address header folding with parsed encoded-word (GH-122754)

Email generators using email.policy.default may convert an RFC 2047
encoded-word to unencoded form during header refolding. In a structured
header, this could allow 'specials' chars outside a quoted-string,
leading to invalid address headers and enabling spoofing. This change
ensures a parsed encoded-word that contains specials is kept as an
encoded-word while the header is refolded.

[Better fix from @bitdancer.]

---------

Co-authored-by: R David Murray <rdmurray@bitdance.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
8 months agogh-128002: fix tsan race in closing socket in `test_sslproto` (#131399)
Kumar Aditya [Tue, 18 Mar 2025 10:50:47 +0000 (16:20 +0530)] 
gh-128002: fix tsan race in closing socket in `test_sslproto` (#131399)

8 months agogh-131311: Consolidate reference handling in PyCStructUnionType_update_stginfo to...
Sergey Miryanov [Tue, 18 Mar 2025 10:50:22 +0000 (15:50 +0500)] 
gh-131311: Consolidate reference handling in PyCStructUnionType_update_stginfo to fix memory leak (GH-131312)

8 months agogh-114917: add support for AI_NUMERICSERV in getaddrinfo emulation (#114918)
Max Bachmann [Tue, 18 Mar 2025 10:26:51 +0000 (11:26 +0100)] 
gh-114917: add support for AI_NUMERICSERV in getaddrinfo emulation (#114918)

8 months agogh-128002: fix tsan race in closing socket in `test_ssl` (#131397)
Kumar Aditya [Tue, 18 Mar 2025 10:11:43 +0000 (15:41 +0530)] 
gh-128002: fix tsan race in closing socket in `test_ssl` (#131397)

8 months agogh-130132: properly free resources in `urrlib.urlopen` examples (#130280)
Kanishk Pachauri [Tue, 18 Mar 2025 09:27:05 +0000 (09:27 +0000)] 
gh-130132: properly free resources in `urrlib.urlopen` examples (#130280)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
8 months agogh-131094: Refine `math.isclose` docs (#131139)
Guy Jacoby [Tue, 18 Mar 2025 09:13:26 +0000 (02:13 -0700)] 
gh-131094: Refine `math.isclose` docs (#131139)

8 months agogh-120144: Make it possible to use `sys.monitoring` for bdb and make it default for...
Tian Gao [Mon, 17 Mar 2025 22:34:37 +0000 (18:34 -0400)] 
gh-120144: Make it possible to use `sys.monitoring` for bdb and make it default for pdb (#124533)

8 months agogh-131002: clarify how to enforce sqlite3 column types for generated fields (#131006)
Erlend E. Aasland [Mon, 17 Mar 2025 22:26:27 +0000 (23:26 +0100)] 
gh-131002: clarify how to enforce sqlite3 column types for generated fields (#131006)

8 months agogh-119786: Fix _PyExecutorObject link at jit.md file (#131382)
Nybblista [Mon, 17 Mar 2025 21:22:12 +0000 (00:22 +0300)] 
gh-119786: Fix _PyExecutorObject link at jit.md file (#131382)

8 months agogh-130080: implement PEP 765 (#130087)
Irit Katriel [Mon, 17 Mar 2025 20:48:54 +0000 (20:48 +0000)] 
gh-130080: implement PEP 765 (#130087)

8 months agoGH-131278: Add option to build with computed gotos on Windows with clang-cl (GH-131279)
Chris Eibl [Mon, 17 Mar 2025 20:32:23 +0000 (21:32 +0100)] 
GH-131278: Add option to build with computed gotos on Windows with clang-cl (GH-131279)

8 months agogh-131325: fix sendfile fallback implementation to drain data after writing to transp...
Kumar Aditya [Mon, 17 Mar 2025 19:22:57 +0000 (00:52 +0530)] 
gh-131325: fix sendfile fallback implementation to drain data after writing to transport (#131376)

8 months agogh-116738: remove multiprocessing suppressions (#131319)
Kumar Aditya [Mon, 17 Mar 2025 18:59:18 +0000 (00:29 +0530)] 
gh-116738: remove multiprocessing suppressions (#131319)

8 months agoFix test_pyrepl.TestDumbTerminal if PYTHON_BASIC_REPL set. (#131332)
R. David Murray [Mon, 17 Mar 2025 17:56:21 +0000 (13:56 -0400)] 
Fix test_pyrepl.TestDumbTerminal if PYTHON_BASIC_REPL set. (#131332)

Most of the tests that care already adjust PYTHON_BASIC_REPL as needed,
but this one doesn't, and it fails if the developer has the variable set.

8 months agoGH-127705: Move mortal decrefs to internal header and make sure _PyReftracerTrack...
Mark Shannon [Mon, 17 Mar 2025 17:23:50 +0000 (17:23 +0000)] 
GH-127705: Move mortal decrefs to internal header and make sure _PyReftracerTrack is called

8 months agoGH-125174: Make immortality "sticky" (GH-131355)
Mark Shannon [Mon, 17 Mar 2025 17:22:35 +0000 (17:22 +0000)] 
GH-125174: Make immortality "sticky" (GH-131355)

* Use a higher threshold for immortality for INCREF than DECREF

8 months agogh-131268: Adjust _PYTHREAD_NAME_MAXLEN on BSD (#131345)
Victor Stinner [Mon, 17 Mar 2025 16:52:59 +0000 (17:52 +0100)] 
gh-131268: Adjust _PYTHREAD_NAME_MAXLEN on BSD (#131345)

Adjust _PYTHREAD_NAME_MAXLEN constant on FreeBSD and NetBSD.
Initial patch by Xavier G.

8 months agogh-131281: Add include for pystats builds (#131369)
Ken Jin [Mon, 17 Mar 2025 16:36:06 +0000 (00:36 +0800)] 
gh-131281: Add include for pystats builds (#131369)

Add include to for pystats builds

8 months agoGH-131291: Suppress clang-specific warning in python_uwp.cpp (GH-131292)
Chris Eibl [Mon, 17 Mar 2025 16:22:25 +0000 (17:22 +0100)] 
GH-131291: Suppress clang-specific warning in python_uwp.cpp (GH-131292)

8 months agogh-116666: Add "token" glossary term (GH-130888)
Petr Viktorin [Mon, 17 Mar 2025 16:05:47 +0000 (17:05 +0100)] 
gh-116666: Add "token" glossary term (GH-130888)

Add glossary entry for `token`, and link to it.
Avoid talking about tokens in the SyntaxError intro (errors.rst); at this point
tokenization is too much of a technical detail. (Even to an advanced reader,
the fact that a *single* token is highlighted isn't too relevant. Also, we don't
need to guarantee that it's a single token.)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
8 months agogh-126895: Fix readline module in free-threaded build (#131208)
Tomasz Pytel [Mon, 17 Mar 2025 15:57:11 +0000 (11:57 -0400)] 
gh-126895: Fix readline module in free-threaded build (#131208)

The underlying readline library is not thread-safe so this adds `@critical_section` to functions that use it.

8 months agoDocs: Fix incorrect sphinx markup for a class member (GH-130970)
Yuki Kobayashi [Mon, 17 Mar 2025 15:28:56 +0000 (00:28 +0900)] 
Docs: Fix incorrect sphinx markup for a class member (GH-130970)

8 months agogh-111178: fix UBSan failures in `Modules/_ssl.c` (GH-130719)
Bénédikt Tran [Mon, 17 Mar 2025 15:25:28 +0000 (16:25 +0100)] 
gh-111178: fix UBSan failures in `Modules/_ssl.c` (GH-130719)

* fix UBSan failures for `PySSLContext`, `PySSLSocket`, `PySSLMemoryBIO`, `PySSLSession`

8 months agoGH-131238: More refactoring of core header files (GH-131351)
Mark Shannon [Mon, 17 Mar 2025 14:41:05 +0000 (14:41 +0000)] 
GH-131238: More refactoring of core header files (GH-131351)

Adds new pycore_stats.h header file to help break dependencies involving the pycore_code.h header.

8 months agogh-131261: Update libexpat to 2.7.0 (CVE-2024-8176) (#131272)
Gregory P. Smith [Mon, 17 Mar 2025 13:55:02 +0000 (06:55 -0700)] 
gh-131261: Update libexpat to 2.7.0 (CVE-2024-8176) (#131272)

8 months agogh-131238: Add explicit includes to pycore headers (#131257)
Victor Stinner [Mon, 17 Mar 2025 11:32:43 +0000 (12:32 +0100)] 
gh-131238: Add explicit includes to pycore headers (#131257)

8 months agogh-131238: Convert pycore_pystate.h static inline to functions (#131352)
Victor Stinner [Mon, 17 Mar 2025 11:31:55 +0000 (12:31 +0100)] 
gh-131238: Convert pycore_pystate.h static inline to functions (#131352)

Convert static inline functions to functions:

* _Py_IsMainThread()
* _PyInterpreterState_Main()
* _Py_IsMainInterpreterFinalizing()
* _Py_GetMainConfig()

8 months agogh-129843: fix pure Python implementation of `warnings.warn_explicit` (#129848)
Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) [Mon, 17 Mar 2025 10:49:53 +0000 (16:19 +0530)] 
gh-129843: fix pure Python implementation of `warnings.warn_explicit` (#129848)

The pure Python implementation of `warnings.warn_explicit` constructs a `WarningMessage`
with an incorrect source (it incorrectly sets the WarningMessage's line to the given `source`).

8 months agogh-127667: refactor and improve `_hashopenssl.c` error branches (#131145)
Bénédikt Tran [Mon, 17 Mar 2025 10:12:55 +0000 (11:12 +0100)] 
gh-127667: refactor and improve `_hashopenssl.c` error branches (#131145)

Refactor `_setException()` into different helpers that can be used separately:

- set_ssl_exception_from_errcode(): set an exception from an explicit SSL error code.
- raise_ssl_error(): set an exception from the last SSL error code or use a user-defined message.
- notify_ssl_error_occurred(): same as raise_ssl_error() but with a generic default message.

8 months agogh-131316: handle NULL values returned by HACL* functions (#131324)
Bénédikt Tran [Mon, 17 Mar 2025 10:10:39 +0000 (11:10 +0100)] 
gh-131316: handle NULL values returned by HACL* functions  (#131324)

- Handle NULL returned by allocation functions.
- Handle NULL returned by copy functions.
- Suppress unused impossible return codes.

8 months agogh-130149: cleanup refactorization of `test_hmac.py` (#131318)
Bénédikt Tran [Mon, 17 Mar 2025 10:10:03 +0000 (11:10 +0100)] 
gh-130149: cleanup refactorization of `test_hmac.py` (#131318)

New features:

* refactor `hashlib_helper.requires_hashdigest` in prevision of a future
  `hashlib_helper.requires_builtin_hashdigest` for built-in hashes only
* add `hashlib_helper.requires_openssl_hashdigest` to request OpenSSL
   hashes, assuming that `_hashlib` exists.

Refactoring:

* split hmac.copy() test by implementation
* update how algorithms are discovered for RFC test cases
* simplify how OpenSSL hash digests are requested
* refactor hexdigest tests for RFC test vectors
* typo fix: `assert_hmac_hexdigest_by_new` -> `assert_hmac_hexdigest_by_name`

Improvements:

* strengthen contract on `hmac_new_by_name` and `hmac_digest_by_name`
* rename mixin classes to better match their responsibility

8 months agogh-93096: Update and document `pickletools` CLI (#131273)
Semyon Moroz [Mon, 17 Mar 2025 09:36:30 +0000 (13:36 +0400)] 
gh-93096: Update and document `pickletools` CLI (#131273)

8 months agoGH-131238: Core header refactor (GH-131250)
Mark Shannon [Mon, 17 Mar 2025 09:19:04 +0000 (09:19 +0000)] 
GH-131238: Core header refactor (GH-131250)

* Moves most structs in pycore_ header files into pycore_structs.h and pycore_runtime_structs.h

* Removes many cross-header dependencies

8 months agogh-131339: test PyBytes_Size for a zero-size bytes object (#131340)
Nybblista [Mon, 17 Mar 2025 08:38:37 +0000 (11:38 +0300)] 
gh-131339: test PyBytes_Size for a zero-size bytes object (#131340)

8 months agogh-127146: Update test skips for Emscripten 4.0.2 (#129474)
Hood Chatham [Sun, 16 Mar 2025 22:02:27 +0000 (23:02 +0100)] 
gh-127146: Update test skips for Emscripten 4.0.2 (#129474)

Updates test skips to reflect capabilities of Emscripten 4.0.2.

8 months agogh-119786: add `JUMP_BACKWARD` macro to the Jumps section (#131213)
Nybblista [Sun, 16 Mar 2025 20:04:39 +0000 (23:04 +0300)] 
gh-119786: add `JUMP_BACKWARD` macro to the Jumps section (#131213)

add JUMP_BACKWARD opcode macro to the Jumps section

JUMP_BACKWARD opcode macro added to the Jumps section in
interpreter.md file at InternalDocs.

8 months agogh-131306: Remove unused code related to `BINARY_SUBSCR` (#131307)
Tomas R. [Sun, 16 Mar 2025 16:37:29 +0000 (17:37 +0100)] 
gh-131306: Remove unused code related to `BINARY_SUBSCR` (#131307)

8 months agogh-131327: Document winsound.SND_APPLICATION (#131328)
AN Long [Sun, 16 Mar 2025 15:27:24 +0000 (00:27 +0900)] 
gh-131327: Document winsound.SND_APPLICATION (#131328)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
8 months agogh-131254: ensure that `BROWSER` is not set for `test_webbrowser` on macOS (#131276)
Bénédikt Tran [Sun, 16 Mar 2025 14:39:30 +0000 (15:39 +0100)] 
gh-131254: ensure that `BROWSER` is not set for `test_webbrowser` on macOS (#131276)

8 months agogh-131277: allow `EnvironmentVarGuard` to unset more than one environment variable...
Bénédikt Tran [Sun, 16 Mar 2025 13:09:33 +0000 (14:09 +0100)] 
gh-131277: allow `EnvironmentVarGuard` to unset more than one environment variable at once (#131280)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
8 months agogh-130160: use `.. program::` directive for documenting `doctest` CLI (#131034)
donBarbos [Sun, 16 Mar 2025 11:53:22 +0000 (15:53 +0400)] 
gh-130160: use `.. program::` directive for documenting `doctest` CLI (#131034)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
8 months agoGH-130614: pathlib ABCs: improve support for receiving path metadata (#131259)
Barney Gale [Sun, 16 Mar 2025 06:11:20 +0000 (06:11 +0000)] 
GH-130614: pathlib ABCs: improve support for receiving path metadata (#131259)

In the private pathlib ABCs, replace `_WritablePath._write_info()` with
`_WritablePath._copy_from()`. This provides the target path object with
more control over the copying process, including support for querying and
setting metadata *before* the path is created.

Adjust `_ReadablePath.copy()` so that it forwards its keyword arguments to
`_WritablePath._copy_from()` of the target path object. This allows us to
remove the unimplemented *preserve_metadata* argument in the ABC method,
making it a `Path` exclusive.

8 months agoGH-131296: fix clang-cl warnings on Windows in pyshellext.cpp (GH-131300)
Chris Eibl [Sat, 15 Mar 2025 18:55:00 +0000 (19:55 +0100)] 
GH-131296:  fix clang-cl warnings on Windows in pyshellext.cpp (GH-131300)

fix unused warnings in pyshellext.cpp

8 months agoGH-131296: fix clang-cl warning on Windows in pytime.c (GH-131297)
Chris Eibl [Sat, 15 Mar 2025 18:41:34 +0000 (19:41 +0100)] 
GH-131296: fix clang-cl warning on Windows in pytime.c (GH-131297)

fix warning : integer literal is too large

to be represented in a signed integer type,
interpreting as unsigned [-Wimplicitly-unsigned-literal]

8 months agoGH-131296: fix clang-cl warnings on Windows in blake2module.c (#131299)
Chris Eibl [Sat, 15 Mar 2025 18:37:53 +0000 (19:37 +0100)] 
GH-131296: fix clang-cl warnings on Windows in blake2module.c (#131299)

work around unimportant clang-cl warnings in blake2module.c

8 months agogh-130213: update hacl_star_rev to 322f6d58290e0ed7f4ecb84fcce12917aa0f594b (GH-130960)
Chris Eibl [Sat, 15 Mar 2025 17:42:27 +0000 (18:42 +0100)] 
gh-130213: update hacl_star_rev to 322f6d58290e0ed7f4ecb84fcce12917aa0f594b (GH-130960)

Updates the HACL* implementation used by hashlib from upstream sources.

8 months agogh-130160: use `.. program::` directive for documenting `http.server` CLI (#131010)
donBarbos [Sat, 15 Mar 2025 16:28:56 +0000 (20:28 +0400)] 
gh-130160: use `.. program::` directive for documenting `http.server` CLI (#131010)

8 months agogh-131281: fix compile error due to `BINARY_SUBSCR` (GH-131283)
Xuanteng Huang [Sat, 15 Mar 2025 15:38:46 +0000 (23:38 +0800)] 
gh-131281: fix compile error due to `BINARY_SUBSCR` (GH-131283)

* fix compile error due to `BINARY_SUBSCR`

* replace stat_inc with `BINARY_OP`

8 months agogh-130480: Move duplicate `LOAD_SMALL_INT` optimization from codegen to CFG (#130481)
Yan Yanchii [Fri, 14 Mar 2025 21:23:27 +0000 (22:23 +0100)] 
gh-130480: Move duplicate `LOAD_SMALL_INT` optimization from codegen to CFG (#130481)

8 months agogh-121468: Fix the doctest failure for asyncio test on pdb (#131258)
Tian Gao [Fri, 14 Mar 2025 20:23:21 +0000 (16:23 -0400)] 
gh-121468: Fix the doctest failure for asyncio test on pdb (#131258)

8 months agoGH-130614: pathlib ABCs: delete vestigial `test_pathlib_abc` module (#131215)
Barney Gale [Fri, 14 Mar 2025 20:04:07 +0000 (20:04 +0000)] 
GH-130614: pathlib ABCs: delete vestigial `test_pathlib_abc` module (#131215)

Remove the `test.test_pathlib.test_pathlib_abc` test module, which was
hollowed out in previous commits. Its few remaining tests are most relevant
to `PurePath` and `Path`, so we move them into `test_pathlib`.

8 months agogh-121468: Add current asyncio task as a convenience variable in pdb (#124367)
Tian Gao [Fri, 14 Mar 2025 18:46:26 +0000 (14:46 -0400)] 
gh-121468: Add current asyncio task as a convenience variable in pdb (#124367)

8 months agoPost 3.14.0a6
Hugo van Kemenade [Fri, 14 Mar 2025 17:09:56 +0000 (19:09 +0200)] 
Post 3.14.0a6

8 months agoPython 3.14.0a6 v3.14.0a6
Hugo van Kemenade [Fri, 14 Mar 2025 15:04:35 +0000 (17:04 +0200)] 
Python 3.14.0a6

8 months agogh-121970: Revert "GH-121970: Extract ``pydoc_topics`` into a new extension (#129116...
Hugo van Kemenade [Fri, 14 Mar 2025 14:25:56 +0000 (16:25 +0200)] 
gh-121970: Revert "GH-121970: Extract ``pydoc_topics`` into a new extension (#129116)" (#131245)

Revert "GH-121970: Extract ``pydoc_topics`` into a new extension (#129116)"

This reverts commit 01bcf13a1c5bfca5124cf2e0679c9d1b25b04708.

8 months agogh-111178: Fix function signatures for test_os (#131227)
Victor Stinner [Fri, 14 Mar 2025 13:53:06 +0000 (14:53 +0100)] 
gh-111178: Fix function signatures for test_os (#131227)

8 months agogh-111178: Fix function signatures in `_asynciomodule.c` (#131228)
Victor Stinner [Fri, 14 Mar 2025 13:37:39 +0000 (14:37 +0100)] 
gh-111178: Fix function signatures in `_asynciomodule.c` (#131228)

8 months agogh-93096: Update and document `pickle` CLI (#131097)
donBarbos [Fri, 14 Mar 2025 13:15:35 +0000 (17:15 +0400)] 
gh-93096: Update and document `pickle` CLI (#131097)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
8 months agoGH-127705: Handle trace refs in specialized decref (GH-131198)
Mark Shannon [Fri, 14 Mar 2025 12:02:09 +0000 (12:02 +0000)] 
GH-127705: Handle trace refs in specialized decref (GH-131198)

This is missing `_PyReftracerTrack` calls, see gh-131238.
Merging as-is for the 3.14.0a6 release.

8 months agogh-131234: Improve `test_popen` with more asserts (#131235)
sobolevn [Fri, 14 Mar 2025 11:38:31 +0000 (14:38 +0300)] 
gh-131234: Improve `test_popen` with more asserts (#131235)

8 months agoGH-125174 Revert: Make immortality "sticky" (GH-131184)" (#131230)
Mark Shannon [Fri, 14 Mar 2025 11:13:47 +0000 (11:13 +0000)] 
GH-125174 Revert: Make immortality "sticky" (GH-131184)" (#131230)

Revert "GH-125174: Make immortality "sticky" (GH-131184)"

This reverts commit 3a91ee97245639c7c4f8852418157d3fc0ec1a82.

8 months agogh-131204: Fix `difflib.HtmlDiff` may not use monospaced font (#131221)
Wulian233 [Fri, 14 Mar 2025 10:45:33 +0000 (18:45 +0800)] 
gh-131204: Fix `difflib.HtmlDiff` may not use monospaced font (#131221)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
8 months agogh-92897: Doc: the check_home removal has been scheduled for 3.15 (#130586)
Hugo van Kemenade [Fri, 14 Mar 2025 10:29:23 +0000 (12:29 +0200)] 
gh-92897: Doc: the check_home removal has been scheduled for 3.15 (#130586)

8 months agogh-131219: Improve tests in `test_lzma.py` by adding more asserts (#131220)
sobolevn [Fri, 14 Mar 2025 10:16:50 +0000 (13:16 +0300)] 
gh-131219: Improve tests in `test_lzma.py` by adding more asserts (#131220)

8 months agogh-130814: Enhance documentation for Python C API type objects (#130817)
sharktide [Fri, 14 Mar 2025 09:53:13 +0000 (05:53 -0400)] 
gh-130814: Enhance documentation for Python C API type objects (#130817)

The "Type Objects" title in `c-api/typeobj.rst`, duplicating the title of `c-api/type.rst`,
has been changed to "Type Objects Structures", thereby slightly improving Sphinx
search.

8 months agogh-111178: Fix function signatures to fix undefined behavior (#131191)
Victor Stinner [Fri, 14 Mar 2025 09:52:15 +0000 (10:52 +0100)] 
gh-111178: Fix function signatures to fix undefined behavior (#131191)

8 months agogh-124269: Simplify `typing.Annotated` docs (#130770)
Stan Ulbrych [Fri, 14 Mar 2025 09:46:57 +0000 (09:46 +0000)] 
gh-124269: Simplify `typing.Annotated` docs (#130770)

---------

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
8 months agogh-111178: Fix function signatures for PyStdPrinter (#131192)
Victor Stinner [Fri, 14 Mar 2025 09:24:38 +0000 (10:24 +0100)] 
gh-111178: Fix function signatures for PyStdPrinter (#131192)

8 months agogh-111178: Fix _PyLegacyEventHandler_Type deallocator (#131193)
Victor Stinner [Fri, 14 Mar 2025 09:23:54 +0000 (10:23 +0100)] 
gh-111178: Fix _PyLegacyEventHandler_Type deallocator (#131193)

Don't use PyObject_Free() as tp_dealloc to avoid an undefined
behavior. Instead, use the default deallocator which just calls
tp_free which is PyObject_Free().

8 months agogh-128540: lookup default webbrowser on macOS (#130535)
Min RK [Fri, 14 Mar 2025 06:51:15 +0000 (07:51 +0100)] 
gh-128540: lookup default webbrowser on macOS (#130535)

Ensure web browser is launched by `webbrowser.open` on macOS, even for `file://` URLs.

8 months agoGH-130396: Work around for broken `pthread_get_stackaddr_np` on Emscripten (#131088)
Hood Chatham [Thu, 13 Mar 2025 23:04:40 +0000 (00:04 +0100)] 
GH-130396: Work around for broken `pthread_get_stackaddr_np` on Emscripten (#131088)

Implements a workaround implementation of `pthread_get_stackaddr_np` for Emscripten.
This will be replaced by an implementation that will be included in Emscripten 4.0.6.

8 months agogh-131196: Improve perfomance of `UUID.hex` and `UUID.__str__` by ~10% (#131197)
Grigory Bukovsky [Thu, 13 Mar 2025 22:57:38 +0000 (01:57 +0300)] 
gh-131196: Improve perfomance of `UUID.hex` and `UUID.__str__` by ~10% (#131197)

Results before and after the fix:

```
hex
before: 0.021755493999989994
after:  0.01465080400066654

str
before: 0.06381790500017814
after:  0.05134949700004654
```

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
8 months agogh-74028: update `whatsnew/3.14.rst` post gh-125663 (#131214)
Enzo Bonnal [Thu, 13 Mar 2025 22:22:04 +0000 (22:22 +0000)] 
gh-74028: update `whatsnew/3.14.rst` post gh-125663 (#131214)

8 months agoGH-130614: pathlib ABCs: parametrize test suite for path copying (#131168)
Barney Gale [Thu, 13 Mar 2025 21:56:59 +0000 (21:56 +0000)] 
GH-130614: pathlib ABCs: parametrize test suite for path copying (#131168)

Test copying from `Path` and `ReadableZipPath` (types of `_ReadablePath`)
to `Path` and `WritableZipPath` (types of `_WritablePath`).

8 months agoRemove `print` from `test_monitoring.py` (#131200)
sobolevn [Thu, 13 Mar 2025 19:54:17 +0000 (22:54 +0300)] 
Remove `print` from `test_monitoring.py` (#131200)

8 months agogh-121464: Make concurrent iteration over enumerate safe under free-threading (#125734)
Pieter Eendebak [Thu, 13 Mar 2025 18:44:05 +0000 (19:44 +0100)] 
gh-121464: Make concurrent iteration over enumerate safe under free-threading (#125734)

8 months agogh-85012: Properly reset msgctxt when compiling messages with msgfmt (GH-130525)
Tomas R. [Thu, 13 Mar 2025 18:40:40 +0000 (19:40 +0100)] 
gh-85012: Properly reset msgctxt when compiling messages with msgfmt (GH-130525)

Add also human-readable snapshots for tests.

8 months agogh-130382: add missing `_PyReftracerTrack` to ceval `Py_DECREF` (#130689)
Tomasz Pytel [Thu, 13 Mar 2025 16:31:49 +0000 (12:31 -0400)] 
gh-130382: add missing `_PyReftracerTrack` to ceval `Py_DECREF` (#130689)

8 months agoGH-125174: Make immortality "sticky" (GH-131184)
Mark Shannon [Thu, 13 Mar 2025 16:10:13 +0000 (16:10 +0000)] 
GH-125174: Make immortality "sticky" (GH-131184)

8 months agogh-130080: move _Py_EnsureArrayLargeEnough to a separate header so it can be used...
Irit Katriel [Thu, 13 Mar 2025 16:02:58 +0000 (16:02 +0000)] 
gh-130080: move _Py_EnsureArrayLargeEnough to a separate header so it can be used outside of the compiler (#130930)

8 months agogh-111178: Fix function signatures in misc files (#131180)
Victor Stinner [Thu, 13 Mar 2025 15:55:08 +0000 (16:55 +0100)] 
gh-111178: Fix function signatures in misc files (#131180)

8 months agogh-131170: fix duplicated sections in frames.md file (#131177)
Nybblista [Thu, 13 Mar 2025 13:59:19 +0000 (16:59 +0300)] 
gh-131170: fix duplicated sections in frames.md file (#131177)

fix duplicated sections in frames.md file

In the frames.md file at InternalDocs, change the first
duplicated title to Specials, and remove unnecessary content
under the Specials section.

8 months agogh-130947: Add again PySequence_Fast() to the limited C API (#130948)
Victor Stinner [Thu, 13 Mar 2025 12:00:57 +0000 (13:00 +0100)] 
gh-130947: Add again PySequence_Fast() to the limited C API (#130948)

Add again PySequence_Fast() to the limited C API.

Add unit tests.

8 months agogh-93096: Remove CLI interface for `difflib` (#131099)
donBarbos [Thu, 13 Mar 2025 11:22:16 +0000 (15:22 +0400)] 
gh-93096: Remove CLI interface for `difflib` (#131099)

8 months agogh-93096: Make `mimetypes` CLI tool public (#93097)
Oleg Iarygin [Thu, 13 Mar 2025 11:19:22 +0000 (15:19 +0400)] 
gh-93096: Make `mimetypes` CLI tool public (#93097)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
8 months agogh-129149: Add fast path for medium-sized integers in `PyLong_FromSsize_t()` (#129301)
Chris Eibl [Thu, 13 Mar 2025 11:06:56 +0000 (12:06 +0100)] 
gh-129149: Add fast path for medium-sized integers in `PyLong_FromSsize_t()` (#129301)

The implementation of `PyLong_FromLong()`, `PyLong_FromLongLong()` and `PyLong_FromSsize_t()`
are now handled by a common macro `PYLONG_FROM_INT` which contains fast paths depending on the
size of the integer to convert. Consequently, `PyLong_FromSsize_t()` for medium-sized integers is faster
by roughly 25%.

---------

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>