]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
5 months agogh-132542: Only run test_native_id_after_fork if native_id is supported (GH-134408)
Noam Cohen [Wed, 21 May 2025 11:10:57 +0000 (14:10 +0300)] 
gh-132542: Only run test_native_id_after_fork if native_id is supported (GH-134408)

5 months agogh-134360 Add processName attribute to `logging.Formatter` docstring (GH-134371)
Sofia Toro [Wed, 21 May 2025 04:49:06 +0000 (00:49 -0400)] 
gh-134360 Add processName attribute to `logging.Formatter` docstring (GH-134371)

5 months agogh-72680: Fix false positives when using zipfile.is_zipfile() (GH-134250)
Tim Hatch [Wed, 21 May 2025 01:32:41 +0000 (18:32 -0700)] 
gh-72680: Fix false positives when using zipfile.is_zipfile() (GH-134250)

bpo-28494: Improve zipfile.is_zipfile reliability

The zipfile.is_zipfile function would only search for the EndOfZipfile
section header. This failed to correctly identify non-zipfiles that
contained this header. Now the zipfile.is_zipfile function verifies
the first central directory entry.

Changes:
* Extended zipfile.is_zipfile to verify zipfile catalog
* Added tests to validate failure of binary non-zipfiles
* Reuse 'concat' handling for is_zipfile

Co-authored-by: John Jolly <john.jolly@gmail.com>
5 months agogh-91048: Fix error path result in _remote_debugging_module (#134347)
Pablo Galindo Salgado [Tue, 20 May 2025 23:54:09 +0000 (19:54 -0400)] 
gh-91048: Fix error path result in _remote_debugging_module (#134347)

5 months agoAdd documentation for remote debugging with pdb (#134260)
ivonastojanovic [Tue, 20 May 2025 23:50:49 +0000 (19:50 -0400)] 
Add documentation for remote debugging with pdb (#134260)

* Mention remote debugging via -p PID in usage text

Adds a brief note to the pdb help summary about attaching to a running
process using the -p option, making the remote debugging feature
more visible.

* Mention remote debugging in pdb.rst

5 months agoGH-131798: Narrow types more aggressively in the JIT (GH-134373)
Brandt Bucher [Tue, 20 May 2025 22:09:51 +0000 (18:09 -0400)] 
GH-131798: Narrow types more aggressively in the JIT (GH-134373)

5 months agoGH-131798: Narrow the return type of _GET_LEN to int (GH-133345)
Nadeshiko Manju [Tue, 20 May 2025 22:02:50 +0000 (06:02 +0800)] 
GH-131798: Narrow the return type of _GET_LEN to int (GH-133345)

5 months agoGH-130727: Avoid race condition in _wmimodule by copying shared data (GH-134313)
Chris Eibl [Tue, 20 May 2025 21:21:25 +0000 (23:21 +0200)] 
GH-130727: Avoid race condition in _wmimodule by copying shared data (GH-134313)

5 months agogh-134209: use heap-allocated memory in `_curses.window.{instr,getstr}` (GH-134283)
tigerding [Tue, 20 May 2025 20:36:04 +0000 (16:36 -0400)] 
gh-134209: use heap-allocated memory in `_curses.window.{instr,getstr}` (GH-134283)

* made curses buffer heap allocated instead of stack
* change docs to explicitly mention the max buffer size
* changing GetStr() function to behave similarly too
* Update Doc/library/curses.rst
* Update instr with proper return error handling
* Update Modules/_cursesmodule.c
* change to strlen and better memory safety
* change from const int to Py_ssize_t
* add mem allocation guard
* update versionchanged to mention it was an increase.
* explicitly use versionchanged 3.14 as that is its own branch now.

TESTED: `python -m test -u curses test_curses`

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
5 months agogh-134215: PyREPL: Do not show underscored modules by default during autocompletion...
Kevin Hernández [Tue, 20 May 2025 20:26:48 +0000 (16:26 -0400)] 
gh-134215: PyREPL: Do not show underscored modules by default during autocompletion (gh-134267)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
5 months agogh-128066: Properly handle history file writes for RO fs on PyREPL (gh-134380)
Chris Patti [Tue, 20 May 2025 19:47:57 +0000 (15:47 -0400)] 
gh-128066: Properly handle history file writes for RO fs on PyREPL (gh-134380)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
5 months agogh-90117: handle dict and mapping views in pprint (#30135)
devdanzin [Tue, 20 May 2025 19:30:00 +0000 (16:30 -0300)] 
gh-90117: handle dict and mapping views in pprint (#30135)

* Teach pprint about dict views with PrettyPrinter._pprint_dict_view and ._pprint_dict_items_view.
* Use _private names for _dict_*_view attributes of PrettyPrinter.
* Use explicit 'items' keyword when calling _pprint_dict_view from _pprint_dict_items_view.
* 📜🤖 Added by blurb_it.
* Improve tests
* Add tests for collections.abc.[Keys|Items|Mapping|Values]View support in pprint.
* Add support for collections.abc.[Keys|Items|Mapping|Values]View in pprint.
* Split _pprint_dict_view into _pprint_abc_view, so pretty-printing normal dict views and ABC views is handled in two simple methods.
* Simplify redundant code.
* Add collections.abc views to some existing pprint tests.
* Test that views from collection.UserDict are correctly formatted by pprint.
* Handle recursive dict and ABC views.
* Test that subclasses of ABC views work in pprint.
* Test dict views coming from collections.Counter.
* Test ABC views coming from collections.ChainMap.
* Test odict views coming from collections.OrderedDict.
* Rename _pprint_abc_view to _pprint_mapping_abc_view.
* Add pprint test for mapping ABC views where ._mapping has a custom __repr__ and fix ChainMap test.
* When a mapping ABC view has a ._mapping that defines a custom __repr__, dispatch pretty-printing it by that __repr__.
* Add tests for ABC mapping views subclasses that don't replace __repr__, also handling those that delete ._mapping on instances.
* Simplify the pretty printing of ABC mapping views.
* Add a test for depth handling when pretty printing dict views.
* Fix checking whether the view type is a subclass of an items view, add a test.
* Move construction of the views __repr__ set out of _safe_repr.

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
5 months agogh-127146: xfail more Emscripten stack overflows (#134358)
Hood Chatham [Tue, 20 May 2025 18:41:14 +0000 (14:41 -0400)] 
gh-127146: xfail more Emscripten stack overflows (#134358)

Adds some additional test xfails for Emscripten stack overflows. Also corrects a test skip for test_io.

5 months agogh-106213: Shorten Emscripten wasm-gc trampoline by a little (#133984)
Hood Chatham [Tue, 20 May 2025 18:22:49 +0000 (14:22 -0400)] 
gh-106213: Shorten Emscripten wasm-gc trampoline by a little (#133984)

Using the if instruction results in slightly shorter trampoline code.

5 months agogh-85045: clarified that the underlying buffer of a TextIOBase can be a RawIOBase...
Alex Kautz [Tue, 20 May 2025 18:18:58 +0000 (14:18 -0400)] 
gh-85045: clarified that the underlying buffer of a TextIOBase can be a RawIOBase (GH-134372)

Added a clarification that the underlying binary buffer of a TextIOBase can be a BufferedIOBase OR a RawIOBase

5 months agogh-127945: Update What's New in Python 3.14 for free-threaded ctypes (#134332)
Kumar Aditya [Tue, 20 May 2025 16:57:23 +0000 (22:27 +0530)] 
gh-127945: Update What's New in Python 3.14 for free-threaded ctypes (#134332)

5 months agogh-128002: add what's new docs for `asyncio` (#134324)
Kumar Aditya [Tue, 20 May 2025 16:41:58 +0000 (22:11 +0530)] 
gh-128002: add what's new docs for `asyncio` (#134324)

5 months agogh-122781: Allow empty offset for `%z` in `strptime` (#132922)
Stan Ulbrych [Tue, 20 May 2025 16:39:58 +0000 (17:39 +0100)] 
gh-122781: Allow empty offset for `%z` in `strptime` (#132922)

* commit

* Move tests

5 months agoGH-133779: Fix finding pyconfig.h on Windows JIT builds (GH-134349)
Brandt Bucher [Tue, 20 May 2025 16:32:26 +0000 (12:32 -0400)] 
GH-133779: Fix finding pyconfig.h on Windows JIT builds (GH-134349)

5 months agogh-132542: Set native thread ID after fork (GH-132701)
Noam Cohen [Tue, 20 May 2025 16:20:25 +0000 (19:20 +0300)] 
gh-132542: Set native thread ID after fork (GH-132701)

5 months agogh-76075: Correct `datetime.timestamp` documentation (#131202)
Stan Ulbrych [Tue, 20 May 2025 16:18:53 +0000 (17:18 +0100)] 
gh-76075: Correct `datetime.timestamp` documentation (#131202)

* Clean up timestamp docs

* Update datetime.rst

* Suggestion

5 months agogh-133980: use atomic store in `PyObject_GenericSetDict` (#133988)
Kumar Aditya [Tue, 20 May 2025 15:41:47 +0000 (21:11 +0530)] 
gh-133980: use atomic store in `PyObject_GenericSetDict` (#133988)

5 months agogh-129748: Update mimalloc to use atomic store for mi_block_set_nextx (#134238)
Donghee Na [Tue, 20 May 2025 15:39:56 +0000 (11:39 -0400)] 
gh-129748: Update mimalloc to use atomic store for mi_block_set_nextx (#134238)

5 months agogh-115999: Add PyCodeObject.co_tlbc to the debug offsets (#134286)
Pablo Galindo Salgado [Tue, 20 May 2025 15:31:37 +0000 (11:31 -0400)] 
gh-115999: Add PyCodeObject.co_tlbc to the debug offsets (#134286)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
5 months agoGH-134282: Always borrow references LOAD_CONST (GH-134284)
Mark Shannon [Tue, 20 May 2025 15:24:11 +0000 (11:24 -0400)] 
GH-134282: Always borrow references LOAD_CONST (GH-134284)

5 months agogh-86802: Fix asyncio memory leak; shielded task exceptions log once through the...
Christian Harries [Tue, 20 May 2025 15:14:27 +0000 (16:14 +0100)] 
gh-86802: Fix asyncio memory leak; shielded task exceptions log once through the exception handler (gh-134331)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
5 months agogh-101100: Fix Sphinx warnings in `library/decimal.rst` (#134303)
Yuki Kobayashi [Tue, 20 May 2025 14:46:13 +0000 (23:46 +0900)] 
gh-101100: Fix Sphinx warnings in `library/decimal.rst` (#134303)

5 months agogh-62824: Add alias for iso-8859-8-i which is the same as iso-8859-8 (gh-134306)
Bas Bloemsaat [Tue, 20 May 2025 13:14:02 +0000 (09:14 -0400)] 
gh-62824:  Add alias for iso-8859-8-i which is the same as iso-8859-8 (gh-134306)

Co-authored-by: David Goncalves <davegoncalves@gmail.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
5 months agogh-75459: Doc: C API: Improve object life cycle documentation (GH-125962)
Richard Hansen [Tue, 20 May 2025 12:25:50 +0000 (08:25 -0400)] 
gh-75459: Doc: C API: Improve object life cycle documentation (GH-125962)

  * Add "cyclic isolate" to the glossary.
  * Add a new "Object Life Cycle" page.
  * Improve docs for related API, with special focus on cross-references and warnings

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
5 months agogh-131357: Add tests for zero-sized bytes objects in test_bytes.py (#134234)
abstractedfox [Tue, 20 May 2025 12:24:27 +0000 (08:24 -0400)] 
gh-131357: Add tests for zero-sized bytes objects in test_bytes.py (#134234)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 months agogh-53189: Document peculiarities of InteractiveConsole in relation to pickle (GH...
Serhiy Storchaka [Tue, 20 May 2025 12:08:40 +0000 (15:08 +0300)] 
gh-53189: Document peculiarities of InteractiveConsole in relation to pickle (GH-123069)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 months agogh-72902: improve Fraction constructor speed for typical inputs (GH-134320)
Sergey B Kirpichev [Tue, 20 May 2025 09:47:27 +0000 (12:47 +0300)] 
gh-72902: improve Fraction constructor speed for typical inputs (GH-134320)

This moves abc check for numbers.Rational - down.

5 months agogh-125843: fix `test_curses.test_attributes` on x86-64 macOS (#134252)
Bénédikt Tran [Tue, 20 May 2025 09:15:39 +0000 (11:15 +0200)] 
gh-125843: fix `test_curses.test_attributes` on x86-64 macOS (#134252)

While some `libcurses` functions are meant to return OK on success,
this is not always the case for all implementations. As such, we relax
the checks on the return values and allow any non-ERR value to be
considered equivalent to OK.

5 months agogh-128307: Update what's new in 3.13 and 3.14 with create_task changes of asyncio...
Guido van Rossum [Tue, 20 May 2025 08:41:22 +0000 (04:41 -0400)] 
gh-128307: Update what's new in 3.13 and 3.14 with create_task changes of asyncio  (#134304)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
5 months agoClean up test_posixpath (GH-134315)
Serhiy Storchaka [Tue, 20 May 2025 07:51:44 +0000 (10:51 +0300)] 
Clean up test_posixpath (GH-134315)

* Ensure that created files and dirs are always removed after test.
  Now addCleanup() does not conflict with tearDown().
* Use os_helper.unlink() and os_helper.rmdir().
* Import TESTFN from os_helper.

5 months agogh-133374: fix test_python_legacy_windows_stdio (GH-134080)
Inada Naoki [Tue, 20 May 2025 04:33:54 +0000 (13:33 +0900)] 
gh-133374: fix test_python_legacy_windows_stdio (GH-134080)

5 months agogh-133940: test_strftime incorrectly calculates expected week (GH-134281)
Gustaf [Tue, 20 May 2025 00:54:48 +0000 (20:54 -0400)] 
gh-133940: test_strftime incorrectly calculates expected week (GH-134281)

Let the system determine the correct tm_wday and tm_isdst.

5 months agogh-134201: Expand explanation of Base85 encodings in base64 docs (#134288)
Alek Binion [Mon, 19 May 2025 23:59:06 +0000 (19:59 -0400)] 
gh-134201: Expand explanation of Base85 encodings in base64 docs (#134288)

Explain history of de-facto standard and how to pick between the two Base-85 encoding functions in the base-64 module.

---------

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
5 months agogh-132983: Add zstd version info to `test.pythoninfo` (#134230)
Stan Ulbrych [Mon, 19 May 2025 22:06:04 +0000 (23:06 +0100)] 
gh-132983: Add zstd version info to `test.pythoninfo` (#134230)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 months agoGH-131798: Add _POP_CALL_TWO_LOAD_CONST_INLINE_BORROW (GH-134268)
Tomas R. [Mon, 19 May 2025 22:00:53 +0000 (18:00 -0400)] 
GH-131798: Add _POP_CALL_TWO_LOAD_CONST_INLINE_BORROW (GH-134268)

5 months agogh-131178: remove runtime tests for `http.server` CLI (#134287)
Bénédikt Tran [Mon, 19 May 2025 21:59:14 +0000 (23:59 +0200)] 
gh-131178: remove runtime tests for `http.server` CLI (#134287)

The runtime behavior of `http.server` CLI is hard to test on an arbitrary platform.
As such, tests asserting the correctness of `python -m http.server` are temporarily
removed and will be rewritten later once a universal solution has been found.

5 months agogh-134235: Import Autocomplete for Builtin Modules (GH-134277)
Tom Wang [Mon, 19 May 2025 21:21:30 +0000 (17:21 -0400)] 
gh-134235: Import Autocomplete for Builtin Modules (GH-134277)

* added enhancement auto completing import with sys builtins

---------

Co-authored-by: Hunter <hyoung3@gmail.com>
5 months agogh-88994: Change `datetime.datetime.now` to half-even rounding (#134258)
John Keith Hohm [Mon, 19 May 2025 20:48:55 +0000 (16:48 -0400)] 
gh-88994: Change `datetime.datetime.now` to half-even rounding (#134258)

Change `datetime.datetime.now` to half-even rounding
for consistency with `datetime.fromtimestamp`.

5 months agoGH-131798: Split CALL_LIST_APPEND into several uops (GH-134240)
Diego Russo [Mon, 19 May 2025 19:48:55 +0000 (15:48 -0400)] 
GH-131798: Split CALL_LIST_APPEND into several uops (GH-134240)

5 months agogh-80184: Set getattr(socket, "SOMAXCONN", 5) as the default queue size for TCPServer...
Sahil Shah [Mon, 19 May 2025 19:28:09 +0000 (15:28 -0400)] 
gh-80184: Set getattr(socket, "SOMAXCONN", 5) as the default queue size for TCPServer (GH-134249)

socketserver.TCPServer default queue size becomes SOMAXCONN instead of 5 when possible.

5 months agoRevert "gh-128639: Don't assume one thread in subinterpreter finalization (gh-128640...
Peter Bierma [Mon, 19 May 2025 18:22:05 +0000 (14:22 -0400)] 
Revert "gh-128639: Don't assume one thread in subinterpreter finalization (gh-128640)" (gh-134256)

This reverts commit 9859791f9e116c827468f307ac0770286c975c8b.

The original change broke the iOS and android buildbots, where the tests are run single-process.

5 months agogh-117596: Add more tests for os.path with invalid paths (GH-134189)
Serhiy Storchaka [Mon, 19 May 2025 18:17:58 +0000 (21:17 +0300)] 
gh-117596: Add more tests for os.path with invalid paths (GH-134189)

5 months agoSimplify interp_look_up_id() (#134257)
Victor Stinner [Mon, 19 May 2025 18:09:10 +0000 (14:09 -0400)] 
Simplify interp_look_up_id() (#134257)

Don't use PyInterpreterState_GetID() but get directly the interpreter
'id' member which cannot fail.

5 months agogh-126883: Add check that timezone fields are in range for `datetime.fromisoformat...
Semyon Moroz [Mon, 19 May 2025 18:07:11 +0000 (18:07 +0000)] 
gh-126883: Add check that timezone fields are in range for `datetime.fromisoformat` (#127242)

It was previously possible to specify things like `+00:90:00` which would be equivalent to `+01:30:00`, but is not a valid ISO8601 string.

---------

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
5 months agoGH-131798: Narrow the return type of isinstance for some known arguments in the JIT...
Tomas R. [Mon, 19 May 2025 17:19:24 +0000 (13:19 -0400)] 
GH-131798: Narrow the return type of isinstance for some known arguments in the JIT (GH-133172)

5 months agogh-128639: Don't assume one thread in subinterpreter finalization (gh-128640)
Peter Bierma [Mon, 19 May 2025 16:24:08 +0000 (12:24 -0400)] 
gh-128639: Don't assume one thread in subinterpreter finalization (gh-128640)

Incidentally, this also fixed the warning not showing up if a subinterpreter wasn't
cleaned up via _interpreters.destroy. I had to update some of the tests as a result.

5 months agoFix typo in get_stack_trace docstring (#134246)
László Kiss Kollár [Mon, 19 May 2025 16:07:39 +0000 (12:07 -0400)] 
Fix typo in get_stack_trace docstring (#134246)

5 months agoGH-134236: make regen-all (GH-134237)
sobolevn [Mon, 19 May 2025 15:39:43 +0000 (18:39 +0300)] 
GH-134236: make regen-all (GH-134237)

5 months agogh-131505: Move len boundary assertions before using len. (#131536)
naya451 [Mon, 19 May 2025 15:10:23 +0000 (18:10 +0300)] 
gh-131505: Move len boundary assertions before using len. (#131536)

Move len boundary assertions before using len.

5 months agogh-128045: Syncs w/ latest opcode metadata (#134231)
Dino Viehland [Mon, 19 May 2025 15:08:50 +0000 (11:08 -0400)] 
gh-128045: Syncs w/ latest opcode metadata (#134231)

Fix opcode metadata

5 months agogh-132795: Add docs for `multiprocessing.Semaphore.locked` (#133299)
Duprat [Mon, 19 May 2025 14:36:09 +0000 (16:36 +0200)] 
gh-132795: Add docs for `multiprocessing.Semaphore.locked` (#133299)

5 months agogh-134214: Fix test case in pyrepl (gh-134223)
Jessica Temporal [Mon, 19 May 2025 14:26:04 +0000 (10:26 -0400)] 
gh-134214: Fix test case in pyrepl (gh-134223)

5 months agogh-128045: Mark unknown opcodes as deopting to themselves (#128044)
Dino Viehland [Mon, 19 May 2025 14:15:16 +0000 (10:15 -0400)] 
gh-128045: Mark unknown opcodes as deopting to themselves (#128044)

* Mark unknown opcodes as deopting to themselves

5 months agogh-134158: Fix PyREPL coloring of double braces in f/t-strings (gh-134159)
Loïc Simon [Mon, 19 May 2025 14:12:23 +0000 (16:12 +0200)] 
gh-134158: Fix PyREPL coloring of double braces in f/t-strings (gh-134159)

Co-authored-by: Loïc Simon <loic.simon@napta.io>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
5 months agogh-125225: Fix column misalignment in help('topics') output (gh-125226)
Étienne Pelletier [Mon, 19 May 2025 14:10:17 +0000 (10:10 -0400)] 
gh-125225: Fix column misalignment in help('topics') output (gh-125226)

The 'help("topics")' output was misaligned due to "ASSIGNMENTEXPRESSIONS"
exceeding the implicit maximum default column width of 19 characters.

Reduced the number of columns from 4 to 3 in the listtopics()
function to allow more space for longer topic names.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
5 months agogh-125843: indicate which C function caused a `curses.error` (#125844)
Bénédikt Tran [Mon, 19 May 2025 13:53:39 +0000 (15:53 +0200)] 
gh-125843: indicate which C function caused a `curses.error` (#125844)

- Rename error helpers with a `curses_set_error_*` prefix instead of `PyCurses*`.
- Cleanly report both NULL and ERR cases.
- Raise `curses.error` in `is_linetouched` instead of a `TypeError`.

5 months agogh-134097: Print number of refs & blocks after each statement in new REPL (gh-134136)
Kirill Podoprigora [Mon, 19 May 2025 13:30:43 +0000 (14:30 +0100)] 
gh-134097: Print number of refs & blocks after each statement in new REPL (gh-134136)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
5 months agogh-122055: Clarify documentation for empty matches in RE (GH-133169)
Serhiy Storchaka [Mon, 19 May 2025 13:27:50 +0000 (16:27 +0300)] 
gh-122055: Clarify documentation for empty matches in RE (GH-133169)

5 months agogh-131178: Add tests for `http.server` command-line interface (#132540)
ggqlq [Mon, 19 May 2025 12:15:04 +0000 (20:15 +0800)] 
gh-131178: Add tests for `http.server` command-line interface (#132540)

5 months agogh-133779: Revert Windows generation of pyconfig.h and go back to a static header...
Steve Dower [Mon, 19 May 2025 10:35:22 +0000 (11:35 +0100)] 
gh-133779: Revert Windows generation of pyconfig.h and go back to a static header. (GH-133966)

Extension builders must specify Py_GIL_DISABLED if they want to link to the free-threaded builds.
This was usually the case already, but this change guarantees it in all circumstances.

5 months agogh-76023: Make os.path.realpath to ignore WinError 1005 in non-strict mode (GH-128328)
BecoKo [Mon, 19 May 2025 09:33:15 +0000 (12:33 +0300)] 
gh-76023: Make os.path.realpath to ignore WinError 1005 in non-strict mode (GH-128328)

5 months agogh-134087: enforce signature of `threading.RLock` (#134178)
Bénédikt Tran [Mon, 19 May 2025 09:26:14 +0000 (11:26 +0200)] 
gh-134087: enforce signature of `threading.RLock` (#134178)

- Reject positional and keyword arguments in `_thread.RLock.__new__`.
- Convert `_thread.lock.__new__` to AC.

5 months agogh-133890: Handle UnicodeEncodeError in tarfile (GH-134147)
Serhiy Storchaka [Sun, 18 May 2025 19:21:06 +0000 (22:21 +0300)] 
gh-133890: Handle UnicodeEncodeError in tarfile (GH-134147)

UnicodeEncodeError is now handled the same way as OSError during
TarFile member extraction.

5 months agogh-133889: Only show the path of the URL in the SimpleHTTPRequestHandler page (GH...
Serhiy Storchaka [Sun, 18 May 2025 18:09:51 +0000 (21:09 +0300)] 
gh-133889: Only show the path of the URL in the SimpleHTTPRequestHandler page (GH-134135)

The query and fragment are ambiguous and not used.

5 months agodocument `Py_VISIT` as a macro in the docs (#133688) 134177/head
da-woods [Sun, 18 May 2025 16:28:43 +0000 (17:28 +0100)] 
document `Py_VISIT` as a macro in the docs (#133688)

5 months agoDocs: Fix the `_PyGenObject_HEAD` reference in the `InternalDocs/generators.md` ...
Nybblista [Sun, 18 May 2025 16:26:58 +0000 (19:26 +0300)] 
Docs: Fix the `_PyGenObject_HEAD` reference in the `InternalDocs/generators.md` (#133739)

5 months ago Fix example in Doc/howto/functional.rst (#133978)
Dave Jagoda [Sun, 18 May 2025 16:26:17 +0000 (09:26 -0700)] 
 Fix example in Doc/howto/functional.rst (#133978)

5 months agofix indent in `controlflow.rst` docs (#134008)
Yongzi Li [Sun, 18 May 2025 16:21:02 +0000 (00:21 +0800)] 
fix indent in `controlflow.rst` docs (#134008)

5 months agogh-134114: Clarify FAQ note about dictonary keys (#134118)
Stan Ulbrych [Sun, 18 May 2025 15:59:20 +0000 (16:59 +0100)] 
gh-134114: Clarify FAQ note about dictonary keys (#134118)

5 months agogh-134173: optimize state transfer between `concurrent.futures.Future` and `asyncio...
J. Nick Koston [Sun, 18 May 2025 15:56:20 +0000 (11:56 -0400)] 
gh-134173: optimize state transfer between `concurrent.futures.Future` and `asyncio.Future` (#134174)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
5 months agogh-134144: Fix use-after-free in zapthreads() (#134145)
b-pass [Sun, 18 May 2025 15:02:29 +0000 (11:02 -0400)] 
gh-134144: Fix use-after-free in zapthreads() (#134145)

5 months agogh-133157: remove usage of `_Py_NO_SANITIZE_UNDEFINED` in `faulthandler` (#134047)
Bénédikt Tran [Sun, 18 May 2025 08:16:10 +0000 (10:16 +0200)] 
gh-133157: remove usage of `_Py_NO_SANITIZE_UNDEFINED` in `faulthandler` (#134047)

In `faulthandler_sigfpe()`, instead of using 1/0 arithmetic, we explicitly raise SIGFPE.
We also remove `faulthandler._read_null()` since reading from NULL is an undefined
behavior and `faulthandler` should not check for low-level C undefined behaviors.

5 months agogh-134082: modernize `string.Formatter` class docstring (#134125)
Bénédikt Tran [Sun, 18 May 2025 08:10:54 +0000 (10:10 +0200)] 
gh-134082: modernize `string.Formatter` class docstring (#134125)

fixup Formatter class docstring

5 months agogh-134100: Fix use-after-free in `PyImport_ImportModuleLevelObject` (#134117)
Nico-Posada [Sun, 18 May 2025 07:11:38 +0000 (03:11 -0400)] 
gh-134100: Fix use-after-free in `PyImport_ImportModuleLevelObject` (#134117)

5 months agogh-134150: Clarify distinction between JSON and Python objects (#134154)
Micha Albert [Sun, 18 May 2025 01:47:37 +0000 (01:47 +0000)] 
gh-134150: Clarify distinction between JSON and Python objects (#134154)

* gh-134150: Clarify distinction between JSON objects and Python objects in json module docs

* Revert change to JSON introduction

* Clarify occurrences of "object literal" as JSON

5 months agogh-134064: Fix sys.remote_exec() error checking (#134067)
Victor Stinner [Sat, 17 May 2025 22:24:40 +0000 (18:24 -0400)] 
gh-134064: Fix sys.remote_exec() error checking (#134067)

5 months agogh-134119: Fix crash from calling next() on exhausted template iterator (#134120)
Jelle Zijlstra [Sat, 17 May 2025 19:23:19 +0000 (12:23 -0700)] 
gh-134119: Fix crash from calling next() on exhausted template iterator (#134120)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
5 months agogh-133999: Fix `except` parsing regression in 3.14 (#134035)
sobolevn [Sat, 17 May 2025 14:57:02 +0000 (17:57 +0300)] 
gh-133999: Fix `except` parsing regression in 3.14 (#134035)

5 months agogh-88275: Add missing `__init__` method to `match` example (#120281)
Kirill Podoprigora [Sat, 17 May 2025 13:11:19 +0000 (14:11 +0100)] 
gh-88275: Add missing `__init__` method to `match` example (#120281)

5 months agoDocs: fix spelling of "test case" in `unittest` documentation (#134137)
Clifford Gama [Sat, 17 May 2025 11:36:38 +0000 (13:36 +0200)] 
Docs: fix spelling of "test case" in `unittest` documentation (#134137)

5 months agoDocs: C API: Improve documentation around non-Python threads with subinterpreters...
Peter Bierma [Sat, 17 May 2025 08:58:41 +0000 (04:58 -0400)] 
Docs: C API: Improve documentation around non-Python threads with subinterpreters (GH-131087)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 months agogh-113878: fix `versionadded` in `dataclasses.field()` documentation (#134065)
Victorien [Sat, 17 May 2025 08:00:13 +0000 (10:00 +0200)] 
gh-113878: fix `versionadded` in `dataclasses.field()` documentation (#134065)

5 months agogh-133881: add forward reference to `list.sort()` in lambda expression tutorial ...
Oleg Burnaev [Sat, 17 May 2025 07:59:37 +0000 (10:59 +0300)] 
gh-133881: add forward reference to `list.sort()` in lambda expression tutorial (#133910)

5 months agogh-133810: remove `http.server.CGIHTTPRequestHandler` and `--cgi` flag (#133811)
Bénédikt Tran [Sat, 17 May 2025 07:58:16 +0000 (09:58 +0200)] 
gh-133810: remove `http.server.CGIHTTPRequestHandler` and `--cgi` flag (#133811)

The CGI HTTP request handler has been deprecated since Python 3.13.

5 months agogh-134098: Fix handling %-encoded trailing slash in SimpleHTTPRequestHandler (GH...
Serhiy Storchaka [Sat, 17 May 2025 07:11:34 +0000 (10:11 +0300)] 
gh-134098: Fix handling %-encoded trailing slash in SimpleHTTPRequestHandler (GH-134099)

5 months agogh-133889: Improve tests for SimpleHTTPRequestHandler (GH-134102)
Serhiy Storchaka [Sat, 17 May 2025 07:00:56 +0000 (10:00 +0300)] 
gh-133889: Improve tests for SimpleHTTPRequestHandler (GH-134102)

5 months agogh-134109: Fix showing comments in pydoc output for argparse (GH-134110)
Serhiy Storchaka [Fri, 16 May 2025 20:29:14 +0000 (23:29 +0300)] 
gh-134109: Fix showing comments in pydoc output for argparse (GH-134110)

Comments immediately preceding the object's source code are used
if the object has no docstring.
Comments that do not describe the object should be separated from
the following source code by an empty line.

5 months agogh-117026: Remove outdated sentence in SimpleHTTPRequestHandler docs (GH-117027)
Saleh Dehqanpour [Fri, 16 May 2025 19:12:40 +0000 (22:42 +0330)] 
gh-117026: Remove outdated sentence in SimpleHTTPRequestHandler docs (GH-117027)

The code was changed in 0f7cddc308b297e6a1c2dd61503acea38401656f (bpo-839496/gh-39531).

5 months agogh-133286: add explanation about `seq` for pathlib Pattern Language (#133340)
alexey semenyuk [Fri, 16 May 2025 18:42:06 +0000 (23:42 +0500)] 
gh-133286: add explanation about `seq` for pathlib Pattern Language (#133340)

5 months agogh-134082: modernize docstrings in `string.Formatter` (#134083)
Bénédikt Tran [Fri, 16 May 2025 18:36:48 +0000 (20:36 +0200)] 
gh-134082: modernize docstrings in `string.Formatter` (#134083)

5 months agogh-133515: fix docs for unawaited coroutines in debug mode (#134081)
Kumar Aditya [Fri, 16 May 2025 15:31:15 +0000 (21:01 +0530)] 
gh-133515: fix docs for unawaited coroutines in debug mode (#134081)

5 months agogh-133604: remove deprecated `java_ver` function (#133888)
Alexey Makridenko [Fri, 16 May 2025 14:17:54 +0000 (16:17 +0200)] 
gh-133604: remove deprecated `java_ver` function (#133888)

5 months agogh-124210: Add introduction to `threading` docs (#127046)
Semyon Moroz [Fri, 16 May 2025 12:17:29 +0000 (12:17 +0000)] 
gh-124210: Add introduction to `threading` docs (#127046)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
5 months agogh-132388: test HACL* and OpenSSL hash functions in pure Python HMAC (#134051)
Bénédikt Tran [Fri, 16 May 2025 12:00:01 +0000 (14:00 +0200)] 
gh-132388: test HACL* and OpenSSL hash functions in pure Python HMAC (#134051)

5 months agogh-134069: bump HACL* revision to incoporate `memset_s` (#134027)
aeiouaeiouaeiouaeiouaeiouaeiou [Fri, 16 May 2025 10:23:11 +0000 (13:23 +0300)] 
gh-134069: bump HACL* revision to incoporate `memset_s` (#134027)

Bumps the HACL* revision to include recent revisions that corrects issues
building with legacy/cross-platform macOS SDKs.

Signed-off-by: aeiouaeiouaeiouaeiouaeiouaeiou <aeioudev@outlook.com>