]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
80 min agogh-154272: Skip more forkserver tests if the start method is unavailable (GH-154499) main
Serhiy Storchaka [Wed, 22 Jul 2026 18:25:37 +0000 (21:25 +0300)] 
gh-154272: Skip more forkserver tests if the start method is unavailable (GH-154499)

Two tests were still not skipped: they were only guarded against Cygwin
and Windows.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
6 hours agoRemove `from stat import *` recommendation from `stat.py` docstring (#154486)
anthony sottile [Wed, 22 Jul 2026 13:41:05 +0000 (09:41 -0400)] 
Remove `from stat import *` recommendation from `stat.py` docstring (#154486)

6 hours agogh-150076: Fix the documented signature of warnings.deprecated (#153879)
Vyron Vasileiadis [Wed, 22 Jul 2026 13:08:34 +0000 (15:08 +0200)] 
gh-150076: Fix the documented signature of warnings.deprecated (#153879)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
7 hours agogh-80678: Document the preferred delimiters of csv.Sniffer (#154336)
Serhiy Storchaka [Wed, 22 Jul 2026 12:20:08 +0000 (15:20 +0300)] 
gh-80678: Document the preferred delimiters of csv.Sniffer (#154336)

The delimiters which win when several combinations fit the sample
equally well were not documented.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
7 hours agogh-153872: macOS: free-threading support is installed by default on Python 3.15 ...
Hugo van Kemenade [Wed, 22 Jul 2026 12:09:55 +0000 (15:09 +0300)] 
gh-153872: macOS: free-threading support is installed by default on Python 3.15 (#154103)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
7 hours agogh-154431: Fix data race in `sys.audithook` (#154462)
sobolevn [Wed, 22 Jul 2026 12:09:20 +0000 (15:09 +0300)] 
gh-154431: Fix data race in `sys.audithook` (#154462)

7 hours agogh-154460: Do not use wcsftime() on OpenBSD (#154461)
Serhiy Storchaka [Wed, 22 Jul 2026 12:07:08 +0000 (15:07 +0300)] 
gh-154460: Do not use wcsftime() on OpenBSD (#154461)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
7 hours agogh-154465: Add configure flag to exclude emscripten_syscalls.c (#154466)
Hood Chatham [Wed, 22 Jul 2026 12:06:00 +0000 (14:06 +0200)] 
gh-154465: Add configure flag to exclude emscripten_syscalls.c (#154466)

Pyodide doesn't want to include emscripten_syscalls.c in the build since it
links a different version of it. This adds a configure flag to drop it.

8 hours agogh-154272: Skip forkserver tests when the start method is unavailable (GH-154274)
Serhiy Storchaka [Wed, 22 Jul 2026 11:15:41 +0000 (14:15 +0300)] 
gh-154272: Skip forkserver tests when the start method is unavailable (GH-154274)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9 hours agogh-84649: Fix unstable test_rollover_at_midnight (GH-154463)
Serhiy Storchaka [Wed, 22 Jul 2026 10:35:42 +0000 (13:35 +0300)] 
gh-84649: Fix unstable test_rollover_at_midnight (GH-154463)

Create the log file in a fresh directory under a name which has never
been used.  On Windows, NTFS file tunneling restored the original
creation time of a file recreated with the same name, which made the
rollover time earlier than the current time and caused an unwanted
rollover.

Also check that the rollover does not happen before the specified time.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
10 hours agogh-154014: Initialize cold executor vm_data fields (GH-154142)
Bhuvansh [Wed, 22 Jul 2026 09:17:47 +0000 (14:47 +0530)] 
gh-154014: Initialize cold executor vm_data fields (GH-154142)

10 hours agogh-154437: Fix test_getcwd_long_path on DragonFly BSD (GH-154438)
Serhiy Storchaka [Wed, 22 Jul 2026 09:05:06 +0000 (12:05 +0300)] 
gh-154437: Fix test_getcwd_long_path on DragonFly BSD (GH-154438)

DragonFly BSD raises EFAULT instead of ENAMETOOLONG when the path
exceeds PATH_MAX.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
11 hours agogh-154435: Fix os.posix_fadvise() and os.posix_fallocate() on DragonFly BSD (GH-154436)
Serhiy Storchaka [Wed, 22 Jul 2026 08:39:11 +0000 (11:39 +0300)] 
gh-154435: Fix os.posix_fadvise() and os.posix_fallocate() on DragonFly BSD (GH-154436)

They return -1 and set errno instead of returning the error number, so
OSError was raised with a meaningless error code.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
11 hours agogh-154443: Fix test_makedev on DragonFly BSD (GH-154444)
Serhiy Storchaka [Wed, 22 Jul 2026 08:36:49 +0000 (11:36 +0300)] 
gh-154443: Fix test_makedev on DragonFly BSD (GH-154444)

major() and minor() do not preserve NODEV on DragonFly BSD.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
11 hours agogh-154441: Skip the scheduler tests if the API requires privileges (GH-154442)
Serhiy Storchaka [Wed, 22 Jul 2026 08:15:22 +0000 (11:15 +0300)] 
gh-154441: Skip the scheduler tests if the API requires privileges (GH-154442)

DragonFly BSD requires privileges to use the scheduler API, even for
the calling process.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
11 hours agogh-154007: Improve test coverage for the `shlex` module (#154009)
Piotr Kaznowski [Wed, 22 Jul 2026 08:08:03 +0000 (10:08 +0200)] 
gh-154007: Improve test coverage for the `shlex` module (#154009)

12 hours agogh-154427: Check the access time in UtimeTests only if it is stored (GH-154428)
Serhiy Storchaka [Wed, 22 Jul 2026 07:00:11 +0000 (10:00 +0300)] 
gh-154427: Check the access time in UtimeTests only if it is stored (GH-154428)

HAMMER2 on DragonFly BSD does not store the access time and os.stat()
returns the modification time instead.  Probe the file system, like it
is already done for the timestamp resolution.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
13 hours agogh-154419: Find the fish shell in test_venv (GH-154420)
Serhiy Storchaka [Wed, 22 Jul 2026 05:53:27 +0000 (08:53 +0300)] 
gh-154419: Find the fish shell in test_venv (GH-154420)

shutil.which('fish') can find the unrelated "Go Fish" game, which is
shipped on several BSD systems.  Search PATH for an executable which
behaves like the fish shell instead.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
14 hours agogh-154416: Fix hanging test_tcflow on DragonFly BSD (GH-154417)
Serhiy Storchaka [Wed, 22 Jul 2026 05:07:53 +0000 (08:07 +0300)] 
gh-154416: Fix hanging test_tcflow on DragonFly BSD (GH-154417)

TCIOFF and TCION transmit STOP and START characters, and closing the
pseudo-terminal waits until they are read.  Discard them.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
14 hours agogh-154414: Skip test_tcsendbreak on DragonFly BSD (GH-154415)
Serhiy Storchaka [Wed, 22 Jul 2026 05:01:25 +0000 (08:01 +0300)] 
gh-154414: Skip test_tcsendbreak on DragonFly BSD (GH-154415)

tcsendbreak() is not supported for pseudo-terminals on DragonFly BSD.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
15 hours agogh-153291: Fix data race in readline.get_completer() and get_pre_input_hook() (gh...
Harjoth Khara [Wed, 22 Jul 2026 04:42:14 +0000 (21:42 -0700)] 
gh-153291: Fix data race in readline.get_completer() and get_pre_input_hook() (gh-153362)

The setters store these hooks while holding the module critical section
(via set_hook's Py_XSETREF), but the getters read and Py_NewRef the same
fields without it. Annotate both getters with @critical_section, matching
the other readline functions (gh-126895).

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
15 hours agogh-154395: Skip test_environment_is_not_modified without rl_change_environment (GH...
Serhiy Storchaka [Wed, 22 Jul 2026 04:25:24 +0000 (07:25 +0300)] 
gh-154395: Skip test_environment_is_not_modified without rl_change_environment (GH-154396)

readline sets LINES and COLUMNS if rl_change_environment is not
available, which is the case with readline older than 6.3.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
15 hours agogh-154394: Skip test_tcsendbreak on OpenBSD (GH-154397)
Serhiy Storchaka [Wed, 22 Jul 2026 04:09:38 +0000 (07:09 +0300)] 
gh-154394: Skip test_tcsendbreak on OpenBSD (GH-154397)

tcsendbreak() is not supported for pseudo-terminals on OpenBSD.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
15 hours agogh-154399: Fix venv activate.csh in a non-interactive shell (GH-154400)
Serhiy Storchaka [Wed, 22 Jul 2026 04:05:10 +0000 (07:05 +0300)] 
gh-154399: Fix venv activate.csh in a non-interactive shell (GH-154400)

activate.csh saved the prompt unconditionally, but the prompt variable
only exists in interactive shells, and csh fails on an undefined
variable.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
18 hours agogh-152902: Add Intel `icx` compiler to `configure.ac` (GH-152825)
hpkfft.com [Wed, 22 Jul 2026 01:25:47 +0000 (18:25 -0700)] 
gh-152902: Add Intel `icx` compiler to `configure.ac` (GH-152825)

18 hours agogh-153741: Harden IDLE GUI tests for newer Tk and display scaling (#153742)
Serhiy Storchaka [Wed, 22 Jul 2026 01:16:50 +0000 (04:16 +0300)] 
gh-153741: Harden IDLE GUI tests for newer Tk and display scaling (#153742)

In test_sidebar.test_mousewheel, only use the X11 <Button-4>/<Button-5> events when testing on
x11 Tk before 8.7.  Otherwise, use <Mousewheel> as on other systems.

In test_configdialog, assert the 'disabled' state flag alone instead of
the exact ttk state tuple (which transient pointer states break), and
restore the tests' method masks with addCleanup().

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
25 hours agogh-103847: fix some asyncio subprocess cancellation bugs (#146571)
Kumar Aditya [Tue, 21 Jul 2026 18:15:59 +0000 (23:45 +0530)] 
gh-103847: fix some asyncio subprocess cancellation bugs (#146571)

25 hours agogh-154389: Do not use uuid_create() on OpenBSD (GH-154390)
Serhiy Storchaka [Tue, 21 Jul 2026 18:05:41 +0000 (21:05 +0300)] 
gh-154389: Do not use uuid_create() on OpenBSD (GH-154390)

Like NetBSD, OpenBSD generates version 4 UUIDs in uuid_create(), so it
cannot be used for uuid.uuid1().

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
27 hours agogh-154379: Fix test_epoll on Solaris (GH-154380)
Serhiy Storchaka [Tue, 21 Jul 2026 16:02:51 +0000 (19:02 +0300)] 
gh-154379: Fix test_epoll on Solaris (GH-154380)

A non-blocking connect() can be completed immediately, and unregistering
a closed file descriptor succeeds on Solaris.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
28 hours agoTest `object_hook` and pickleability of some JSON components (GH-154155)
David [Tue, 21 Jul 2026 15:08:01 +0000 (17:08 +0200)] 
Test `object_hook` and pickleability of some JSON components (GH-154155)

28 hours agogh-154366: Fix test_asyncio.test_sendfile timing out on DragonFly BSD (GH-154367)
Serhiy Storchaka [Tue, 21 Jul 2026 15:03:20 +0000 (18:03 +0300)] 
gh-154366: Fix test_asyncio.test_sendfile timing out on DragonFly BSD (GH-154367)

A 4 KiB receive buffer makes DragonFly defer every window update to the
delayed ACK timer, so each buffer worth of data costs 100 ms.  Use a
larger socket buffer there; it is still small enough to pause the
protocol long before all data is sent.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
30 hours agogh-154352: Fix killing a worker process in regrtest on OpenBSD (GH-154353)
Serhiy Storchaka [Tue, 21 Jul 2026 13:22:20 +0000 (16:22 +0300)] 
gh-154352: Fix killing a worker process in regrtest on OpenBSD (GH-154353)

os.getsid() is only allowed for a process in the same session on
OpenBSD.  Worker processes are started in their own session, so the
failure means that the process group can be killed.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
30 hours agogh-154345: Fix test_posix_pty_functions() killing the worker on Solaris (GH-154346)
Serhiy Storchaka [Tue, 21 Jul 2026 13:12:20 +0000 (16:12 +0300)] 
gh-154345: Fix test_posix_pty_functions() killing the worker on Solaris (GH-154346)

Pushing the "ptem" STREAMS module makes a session leader without a
controlling terminal acquire the slave as one, so closing the file
descriptors sent SIGHUP to the session and killed the regrtest worker.
Disown it after the pushes, as os.openpty() does.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
31 hours agogh-154320: Fix swapped __defaults__/__kwdefaults__ in annotationlib docs (#154321)
Solaris-star [Tue, 21 Jul 2026 12:45:42 +0000 (20:45 +0800)] 
gh-154320: Fix swapped __defaults__/__kwdefaults__ in annotationlib docs (#154321)

The bullet list under "Creating a custom callable annotate function"
had the attribute names reversed: positional defaults are __defaults__
(a tuple) and keyword defaults are __kwdefaults__ (a dict). The example
code below was already correct.

Fixes #154320

31 hours agogh-153881: Atomically load `dk_nentries` in `_PyObject_IsInstanceDictEmpty` (#153882)
Brij Kapadia [Tue, 21 Jul 2026 12:07:17 +0000 (08:07 -0400)] 
gh-153881: Atomically load `dk_nentries` in `_PyObject_IsInstanceDictEmpty` (#153882)

33 hours agogh-154275: Fix cleanup code in `_Py_make_parameters` (#154341)
sobolevn [Tue, 21 Jul 2026 10:25:37 +0000 (13:25 +0300)] 
gh-154275: Fix cleanup code in `_Py_make_parameters` (#154341)

34 hours agogh-139373: Fix asyncio Process.communicate() losing output when cancelled (#154223)
Kumar Aditya [Tue, 21 Jul 2026 08:53:58 +0000 (14:23 +0530)] 
gh-139373: Fix asyncio Process.communicate() losing output when cancelled (#154223)

Output already read when communicate() is cancelled (e.g. by a
wait_for() timeout) is now retained on the Process and returned by a
subsequent communicate() call, matching subprocess.Popen.communicate()
behaviour on timeout. Passing input to a communicate() call following a
cancelled one now raises ValueError.

35 hours agogh-145685: per-type method cache implementation (#150160)
Kumar Aditya [Tue, 21 Jul 2026 08:41:22 +0000 (14:11 +0530)] 
gh-145685: per-type method cache implementation (#150160)

37 hours agogh-154326: Fix test_fsize_not_too_big() on Solaris (GH-154329)
Serhiy Storchaka [Tue, 21 Jul 2026 06:39:44 +0000 (09:39 +0300)] 
gh-154326: Fix test_fsize_not_too_big() on Solaris (GH-154329)

Solaris silently converts resource limits that do not fit in a signed
64-bit integer to RLIM_INFINITY.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
37 hours agogh-83273: Rewrite csv.Sniffer dialect detection using trial parsing (GH-153694)
Serhiy Storchaka [Tue, 21 Jul 2026 06:22:53 +0000 (09:22 +0300)] 
gh-83273: Rewrite csv.Sniffer dialect detection using trial parsing (GH-153694)

Guess the dialect by parsing the sample with every plausible
combination of delimiter, quotechar and escapechar, using the actual
CSV parser in strict mode, and choosing the combination which splits
the sample into rows with the most consistent number of fields.  The
old heuristics, which guessed the delimiter from characters adjacent
to quotes and from character frequencies, are removed.

A large sample is parsed incrementally: first only its beginning,
then, after eliminating the combinations which are clearly worse than
the leader, a several times larger part, and so on.

* csv.Sniffer can now detect escapechar='\\'.
* Explicitly requested delimiters are no longer restricted to ASCII.
* A delimiter inside a quoted field no longer wins over the actual
  delimiter, and sniffing no longer takes quadratic time on quoted
  samples.
* The sample can be cut off at an arbitrary point: in the middle of a
  row, of a quoted field or of an escaped sequence.
* Only '\r', '\n' and '\r\n' are treated as row separators, so
  characters like '\x1c' can now be detected as a delimiter.
* A preamble (title or comment lines) before the data does not prevent
  detection if the data rows outnumber the preamble lines.
* A sample consisting of a single column of quoted fields now raises
  csv.Error instead of guessing a delimiter from the content of the
  fields, and Sniffer.has_header() no longer raises ValueError for
  such samples.
* doublequote is detected by comparing the two readings of the sample.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
37 hours agogh-154325: Skip test_add_file_after_2107() if the file system rejects the timestamp...
Serhiy Storchaka [Tue, 21 Jul 2026 06:08:45 +0000 (09:08 +0300)] 
gh-154325: Skip test_add_file_after_2107() if the file system rejects the timestamp (GH-154328)

Some file systems (UFS and ZFS on illumos) reject timestamps that do not
fit in 32 bits with EOVERFLOW instead of raising OverflowError.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
38 hours agogh-103925: Fix csv.Sniffer for a quoted field ending a CRLF line (GH-103926)
Zhou Wei [Tue, 21 Jul 2026 05:24:21 +0000 (13:24 +0800)] 
gh-103925: Fix csv.Sniffer for a quoted field ending a CRLF line (GH-103926)

"$" does not match before "\r" even in the MULTILINE mode, so such a
field was not found and the delimiter was guessed from character
frequencies instead, which could give a letter.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
42 hours agogh-148665: Enable socket.shutdown function for emscripten (#148666)
Gyeongjae Choi [Tue, 21 Jul 2026 00:46:48 +0000 (02:46 +0200)] 
gh-148665: Enable socket.shutdown function for emscripten (#148666)

Re-enable the autoconf check for socket.shutdown on Emscripten, as some
Emscripten environments are able to provide this call.

44 hours agogh-154308: Clear file flags in os_helper.rmtree() (GH-154310)
Serhiy Storchaka [Mon, 20 Jul 2026 22:47:43 +0000 (01:47 +0300)] 
gh-154308: Clear file flags in os_helper.rmtree() (GH-154310)

On BSD systems a test may leave behind files or directories with flags
such as UF_IMMUTABLE or UF_NOUNLINK set, which prevent the directory from
being modified or removed.  Clear the flags before removing, so cleaning
up a temporary directory does not fail.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
44 hours agogh-154307: Fix TemporaryDirectory cleanup on DragonFly BSD (GH-154309)
Serhiy Storchaka [Mon, 20 Jul 2026 22:46:59 +0000 (01:46 +0300)] 
gh-154307: Fix TemporaryDirectory cleanup on DragonFly BSD (GH-154309)

On DragonFly BSD, removing a file or directory with the UF_NOUNLINK flag
fails with EISDIR (IsADirectoryError) instead of EPERM, so the cleanup did
not reset the flags.  Handle IsADirectoryError the same as PermissionError.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
45 hours agogh-154275: Do not crash on deeply nested `__parameters__` in `GenericAlias` (#154277)
sobolevn [Mon, 20 Jul 2026 22:11:04 +0000 (01:11 +0300)] 
gh-154275: Do not crash on deeply nested `__parameters__` in `GenericAlias` (#154277)

45 hours agogh-154303: Skip test_sqlite3 CLI completion tests on OpenBSD (GH-154304)
Serhiy Storchaka [Mon, 20 Jul 2026 22:10:11 +0000 (01:10 +0300)] 
gh-154303: Skip test_sqlite3 CLI completion tests on OpenBSD (GH-154304)

OpenBSD's readline does not honor "completion-query-items 0", so completing
many candidates blocks on a "Display all N?" prompt that hangs the
pseudo-terminal opened by run_pty().  Skip the whole Completion class on
OpenBSD, like the existing libedit skip.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
46 hours agogh-153511: Removes Tools/msi, Tools/nuget, and legacy py.exe launcher sources (GH...
Steve Dower [Mon, 20 Jul 2026 21:25:12 +0000 (22:25 +0100)] 
gh-153511: Removes Tools/msi, Tools/nuget, and legacy py.exe launcher sources (GH-153512)

47 hours agogh-154291: Fix socket.has_dualstack_ipv6() on DragonFly BSD (GH-154292)
Serhiy Storchaka [Mon, 20 Jul 2026 19:59:56 +0000 (22:59 +0300)] 
gh-154291: Fix socket.has_dualstack_ipv6() on DragonFly BSD (GH-154292)

On DragonFly BSD setsockopt(IPPROTO_IPV6, IPV6_V6ONLY, 0) succeeds without
actually clearing the flag, so has_dualstack_ipv6() wrongly returned True.
Verify with getsockopt() that IPV6_V6ONLY was cleared.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 days agogh-154289: Fix test_socket.testGetServBy on DragonFly (GH-154290)
Serhiy Storchaka [Mon, 20 Jul 2026 19:25:33 +0000 (22:25 +0300)] 
gh-154289: Fix test_socket.testGetServBy on DragonFly (GH-154290)

DragonFly lists "echo 4/ddp" before "echo 7/tcp" in /etc/services, like
FreeBSD, so avoid the "echo" service there too.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 days agogh-154283: Make threading.get_native_id() unique across processes on DragonFly (GH...
Serhiy Storchaka [Mon, 20 Jul 2026 19:13:21 +0000 (22:13 +0300)] 
gh-154283: Make threading.get_native_id() unique across processes on DragonFly (GH-154287)

On DragonFly BSD lwp_gettid() is only unique within a process (the main
thread is always LWP 1), so combine it with the process id, like Solaris.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 days agogh-154279: Skip readline completion tests that fail on DragonFly and illumos (GH...
Serhiy Storchaka [Mon, 20 Jul 2026 18:32:24 +0000 (21:32 +0300)] 
gh-154279: Skip readline completion tests that fail on DragonFly and illumos (GH-154280)

They are already skipped on FreeBSD, where a backspace does not remove
the auto-indentation.  The same happens on DragonFly and illumos.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 days agogh-154240: Skip cmsg truncation socket tests on OpenBSD and DragonFly (GH-154244)
Serhiy Storchaka [Mon, 20 Jul 2026 14:54:22 +0000 (17:54 +0300)] 
gh-154240: Skip cmsg truncation socket tests on OpenBSD and DragonFly (GH-154244)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 days agogh-154260: Fix test_flush_parameters on DragonFly BSD (GH-154261)
Serhiy Storchaka [Mon, 20 Jul 2026 14:22:51 +0000 (17:22 +0300)] 
gh-154260: Fix test_flush_parameters on DragonFly BSD (GH-154261)

DragonFly, like FreeBSD, rejects mmap.flush() with MS_ASYNC|MS_INVALIDATE
(EINVAL).  Use str.startswith() so the check also matches DragonFly, whose
sys.platform carries a version suffix.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 days agogh-99968: FAQ: dev versions end in `+dev` (#153262)
Hugo van Kemenade [Mon, 20 Jul 2026 14:17:28 +0000 (16:17 +0200)] 
gh-99968: FAQ: dev versions end in `+dev` (#153262)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 days agogh-154167: Fix test suite hang when SIGINT is ignored (GH-154168)
Serhiy Storchaka [Mon, 20 Jul 2026 14:14:50 +0000 (17:14 +0300)] 
gh-154167: Fix test suite hang when SIGINT is ignored (GH-154168)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 days agogh-154258: Fix mmap.resize() crash on NetBSD growing a shared anonymous mapping ...
Serhiy Storchaka [Mon, 20 Jul 2026 14:06:19 +0000 (17:06 +0300)] 
gh-154258: Fix mmap.resize() crash on NetBSD growing a shared anonymous mapping (GH-154259)

NetBSD mremap() returns a mapping whose grown region is not backed when
growing a shared anonymous mapping, so accessing it crashes.  Reject it
with ValueError, as is already done on Linux.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 days agogh-152433: Alternate implementation of _winapi.GetVersion for modern API sets (GH...
thexai [Mon, 20 Jul 2026 11:28:06 +0000 (13:28 +0200)] 
gh-152433: Alternate implementation of _winapi.GetVersion for modern API sets (GH-152694)

2 days agoFix two typos in two stdlib docstrings (#153479)
Javad Koushyar [Mon, 20 Jul 2026 10:22:08 +0000 (05:22 -0500)] 
Fix two typos in two stdlib docstrings (#153479)

2 days agoBump `profiling.sampling.cli._SYNC_TIMEOUT_SEC` to fix failures on slow Buildbots...
Stan Ulbrych [Mon, 20 Jul 2026 10:14:45 +0000 (12:14 +0200)] 
Bump `profiling.sampling.cli._SYNC_TIMEOUT_SEC` to fix failures on slow Buildbots (#154248)

2 days agoFix typo in C API Type Object Structures documentation (#154249)
Michael Newman [Mon, 20 Jul 2026 10:07:05 +0000 (06:07 -0400)] 
Fix typo in C API Type Object Structures documentation (#154249)

2 days agogh-125860: Skip separate-SCM_RIGHTS socket tests on NetBSD, OpenBSD and DragonFly...
Serhiy Storchaka [Mon, 20 Jul 2026 09:22:00 +0000 (12:22 +0300)] 
gh-125860: Skip separate-SCM_RIGHTS socket tests on NetBSD, OpenBSD and DragonFly (GH-154239)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 days agogh-154226: Fix test_posix_pty_functions on Solaris (GH-154230)
Serhiy Storchaka [Mon, 20 Jul 2026 08:51:10 +0000 (11:51 +0300)] 
gh-154226: Fix test_posix_pty_functions on Solaris (GH-154230)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 days agogh-154225: Fix os.openpty() acquiring a controlling terminal on Solaris (GH-154229)
Serhiy Storchaka [Mon, 20 Jul 2026 08:48:30 +0000 (11:48 +0300)] 
gh-154225: Fix os.openpty() acquiring a controlling terminal on Solaris (GH-154229)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 days agogh-154227: Fix os.posix_openpt() on OpenBSD (GH-154228)
Serhiy Storchaka [Mon, 20 Jul 2026 08:48:14 +0000 (11:48 +0300)] 
gh-154227: Fix os.posix_openpt() on OpenBSD (GH-154228)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 days agogh-154218: Fix test_posix_fallocate on file systems that do not support posix_falloca...
Serhiy Storchaka [Mon, 20 Jul 2026 08:11:53 +0000 (11:11 +0300)] 
gh-154218: Fix test_posix_fallocate on file systems that do not support posix_fallocate() (GH-154219)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 days agogh-127049: fix race condition in asyncio signalling an unrelated process with Threade...
Kumar Aditya [Mon, 20 Jul 2026 06:27:32 +0000 (11:57 +0530)] 
gh-127049: fix race condition in asyncio signalling an unrelated process with ThreadedChildWatcher (#153810)

2 days agogh-154176: Fix locale.strxfrm() crash on DragonFly BSD (GH-154177)
Serhiy Storchaka [Mon, 20 Jul 2026 05:59:31 +0000 (08:59 +0300)] 
gh-154176: Fix locale.strxfrm() crash on DragonFly BSD (GH-154177)

Query the result size with a real one-element buffer instead of
wcsxfrm(NULL, s, 0): DragonFly BSD's wcsxfrm() crashes when the
destination is NULL or the size is 0.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 days agogh-154211: Skip C-stack exhaustion tests when the C stack is huge (GH-154212)
Serhiy Storchaka [Mon, 20 Jul 2026 05:58:25 +0000 (08:58 +0300)] 
gh-154211: Skip C-stack exhaustion tests when the C stack is huge (GH-154212)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 days agogh-154146: Fix accuracy of the math.acospi() fallback near 1 (GH-154148)
Serhiy Storchaka [Mon, 20 Jul 2026 05:56:50 +0000 (08:56 +0300)] 
gh-154146: Fix accuracy of the math.acospi() fallback near 1 (GH-154148)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 days agogh-154136: Define _ISOC23_SOURCE to fix building the math module on FreeBSD (GH-154138)
Serhiy Storchaka [Mon, 20 Jul 2026 05:00:11 +0000 (08:00 +0300)] 
gh-154136: Define _ISOC23_SOURCE to fix building the math module on FreeBSD (GH-154138)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 days agogh-154046: docs: fix dead link to codahale timing attacks article in secrets.rst...
Pranav Choudhary [Mon, 20 Jul 2026 04:54:04 +0000 (10:24 +0530)] 
gh-154046: docs: fix dead link to codahale timing attacks article in secrets.rst (#154047)

2 days agogh-154137: Fix handle leak in test_winapi (#154201)
Victor Stinner [Sun, 19 Jul 2026 22:19:32 +0000 (00:19 +0200)] 
gh-154137: Fix handle leak in test_winapi (#154201)

Make sure that events handles are closed.

2 days agogh-145177: Upgrade to Emscripten 6.0.3 (#154029)
Hood Chatham [Sun, 19 Jul 2026 22:17:04 +0000 (00:17 +0200)] 
gh-145177: Upgrade to Emscripten 6.0.3 (#154029)

3 days agoFix grammatical typos in documentation (#154181)
ilya [Sun, 19 Jul 2026 19:15:23 +0000 (22:15 +0300)] 
Fix grammatical typos in documentation (#154181)

3 days agogh-151022: Fix remote debugging linetable reads (#151036)
Goutam Adwant [Sun, 19 Jul 2026 18:32:43 +0000 (11:32 -0700)] 
gh-151022: Fix remote debugging linetable reads (#151036)

3 days agofix ResourceWarnings of test_kill_issue43884 in asyncio (#154178)
Kumar Aditya [Sun, 19 Jul 2026 18:18:14 +0000 (23:48 +0530)] 
fix ResourceWarnings of test_kill_issue43884 in asyncio (#154178)

3 days agoFix typos in `Py_tp_base` macro documentation (#154150)
Michael Newman [Sun, 19 Jul 2026 17:33:57 +0000 (13:33 -0400)] 
Fix typos in `Py_tp_base` macro documentation (#154150)

3 days agogh-104533: Fix ctypes test_pointer_proto_missing_argtypes_error() (#154169)
Victor Stinner [Sun, 19 Jul 2026 16:24:12 +0000 (18:24 +0200)] 
gh-104533: Fix ctypes test_pointer_proto_missing_argtypes_error() (#154169)

Save/restore Py_GetVersion.argtypes, since Py_GetVersion is used in
another test.

3 days agogh-119710: fix asyncio Process.wait() to finish on process exit and not wait for...
Tobias Alex-Petersen [Sun, 19 Jul 2026 15:58:58 +0000 (15:58 +0000)] 
gh-119710: fix asyncio Process.wait() to finish on process exit and not wait for closing of pipes (#151983)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
3 days agogh-62534: Document that three-argument type() does not call __prepare__ (GH-154028)
soreavis [Sun, 19 Jul 2026 15:31:59 +0000 (17:31 +0200)] 
gh-62534: Document that three-argument type() does not call __prepare__ (GH-154028)

The three-argument form of type() skips the metaclass __prepare__
method, which is called by the class statement machinery rather than
by the metaclass call itself. Say so in the type() entry and point to
types.new_class() for dynamic class creation with the appropriate
metaclass, as directed in the issue thread.

3 days agogh-139806: Mention pickle error changes in What's New in 3.14 (GH-154020)
Serhiy Storchaka [Sun, 19 Jul 2026 15:20:35 +0000 (18:20 +0300)] 
gh-139806: Mention pickle error changes in What's New in 3.14 (GH-154020)

The gh-122311 changes made pickle.dump() and pickle.dumps() raise
PicklingError for some failures that previously raised AttributeError,
ImportError, ValueError or UnicodeEncodeError, depending on the
implementation.
Add an entry about this in the "Porting to Python 3.14" section.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
3 days agogh-153903: Use `@ctypes.util.wrap_dll_function()` (#154122)
Victor Stinner [Sun, 19 Jul 2026 15:12:07 +0000 (17:12 +0200)] 
gh-153903: Use `@ctypes.util.wrap_dll_function()` (#154122)

3 days agogh-154144: Fix false positive from the stdbool.h guard in _testcapimodule.c (GH-154145)
Serhiy Storchaka [Sun, 19 Jul 2026 15:06:48 +0000 (18:06 +0300)] 
gh-154144: Fix false positive from the stdbool.h guard in _testcapimodule.c (GH-154145)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
3 days agogh-153906: Show 'Data' in code formatting (#154132)
Hugo van Kemenade [Sun, 19 Jul 2026 14:45:17 +0000 (16:45 +0200)] 
gh-153906: Show 'Data' in code formatting (#154132)

3 days agogh-153932: protect read of en_index during enumerate.reduce (GH-154118)
L. Le [Sun, 19 Jul 2026 13:20:56 +0000 (15:20 +0200)] 
gh-153932: protect read of en_index during enumerate.reduce (GH-154118)

3 days agogh-152433: Windows: ``_uuid`` module: improve UWP compatibility (#152793)
thexai [Sun, 19 Jul 2026 13:19:40 +0000 (15:19 +0200)] 
gh-152433: Windows: ``_uuid`` module: improve UWP compatibility (#152793)

3 days agoimprove json test coverage (GH-154123)
David [Sun, 19 Jul 2026 13:19:00 +0000 (15:19 +0200)] 
improve json test coverage (GH-154123)

Add test that covers the except block on line 106 of decoder.py

3 days agogh-151949: Fix Sphinx reference warnings in `Doc/library/lzma.rst` (GH-153878)
Vyron Vasileiadis [Sun, 19 Jul 2026 13:10:47 +0000 (16:10 +0300)] 
gh-151949: Fix Sphinx reference warnings in `Doc/library/lzma.rst` (GH-153878)

The lzma module constants (FORMAT_*, CHECK_*, PRESET_*, FILTER_*, MODE_*
and MF_*) were referenced with the :const: role throughout the module
documentation but were never defined as reference targets, producing
"reference target not found" warnings under nitpicky mode.

Document these public constants with .. data:: directives, following the
convention used by the signal, socket and ssl modules, so the existing
references resolve. The now-redundant inline descriptions of the format
and check constants are condensed into linked references.

3 days agourllib: Add tests for HTTP errors to complete coverage (#154102)
Ajob Kustra [Sun, 19 Jul 2026 12:29:17 +0000 (14:29 +0200)] 
urllib: Add tests for HTTP errors to complete coverage (#154102)

* add test for httperror props such as reason and fp, and stringified urlerror test

* rm unnecessary 'reason' attr test, change url to filename and add reason and headers attr

* separate file pointer test

* prevent resource warning, close httperror exception

* exc > err

3 days agogh-154055: Gate optional curses functions absent on old SVr4 curses (GH-154057)
Serhiy Storchaka [Sun, 19 Jul 2026 12:26:47 +0000 (15:26 +0300)] 
gh-154055: Gate optional curses functions absent on old SVr4 curses (GH-154057)

Build hygiene so the curses modules build against a limited curses (e.g. the
native SVr4 curses of illumos/Solaris), matching how other optional functions
are already gated:

* Probe and #ifdef-gate the X/Open attr_t functions (window.attr_get/attr_set/
  attr_on/attr_off/color_set), the soft-label attribute functions
  (slk_attr_on/off/set, slk_color) and scr_set(); scr_set is probed separately
  from the scr_dump family, which SVr4 has without it.
* Stop gating update_lines_cols() on resizeterm(): it only reads LINES/COLS and
  is used unconditionally (e.g. by set_term()), so a build without resizeterm()
  failed to link.
* On Solaris/illumos define _BOOL (and include <stdbool.h>) so the SVr4
  <curses.h> "typedef char bool" does not clash with C's bool.

test.test_curses: skip or guard the tests that use the now-optional functions,
split test_attributes so its chtype-based part still runs, and treat the native
curses of NetBSD and illumos/Solaris as having broken newterm() (they crash on
repeated newterm()/delscreen(), like ncurses before 6.5).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 days agogh-104533: Use `@ctypes.util.struct` decorator (#154031)
Victor Stinner [Sun, 19 Jul 2026 12:08:56 +0000 (14:08 +0200)] 
gh-104533: Use `@ctypes.util.struct` decorator (#154031)

Use also `@ctypes.util.wrap_dll_function()` decorator.

3 days agogh-153903: Use `@ctypes.util.wrap_dll_function()` with pythonapi (#154030)
Victor Stinner [Sun, 19 Jul 2026 12:04:30 +0000 (14:04 +0200)] 
gh-153903: Use `@ctypes.util.wrap_dll_function()` with pythonapi (#154030)

Use the `@ctypes.util.wrap_dll_function()` decorator with
ctypes.pythonapi to wrap Python C API functions in the test suite.

3 days agoAdd test for explicit `cls` argument bypassing default JSON decoder (#154094)
Dominic H. [Sun, 19 Jul 2026 11:58:06 +0000 (13:58 +0200)] 
Add test for explicit `cls` argument bypassing default JSON decoder (#154094)

* Add test for skipped `cls=None` case

* Fix lint

* Add new line between classes

3 days agogh-104533: Update test_ctypes.test_structures (#154091)
Victor Stinner [Sun, 19 Jul 2026 10:51:29 +0000 (12:51 +0200)] 
gh-104533: Update test_ctypes.test_structures (#154091)

3 days agoDocument getopt and gnu_getopt longopts argument as string (#153976)
Florian Freitag [Sun, 19 Jul 2026 10:26:26 +0000 (12:26 +0200)] 
Document getopt and gnu_getopt longopts argument as string (#153976)

Document getopt and gnu_getopt longopts as string

3 days agogh-104533: Fix `@ctypes.util.struct` with endian (#154038)
Victor Stinner [Sun, 19 Jul 2026 10:07:43 +0000 (12:07 +0200)] 
gh-104533: Fix `@ctypes.util.struct` with endian (#154038)

Change `_fields_` type to a list of tuples, instead of a list of lists.

Modify test.test_ctypes.test_aligned_structures to test also
`@ctypes.util.struct` decorator.

3 days agogh-104533: Fix `@ctypes.util.struct` with string annotations (#154040)
Victor Stinner [Sun, 19 Jul 2026 10:05:22 +0000 (12:05 +0200)] 
gh-104533: Fix `@ctypes.util.struct` with string annotations (#154040)

Fix `@ctypes.util.struct` on structures declared in a module which uses
`from __future__ import annotations`. The decorator now calls
get_annotations() with eval_str=True.

3 days agogh-153903: Fix ctypes wrap_dll_function() with string annotations (#154042)
Victor Stinner [Sun, 19 Jul 2026 10:04:40 +0000 (12:04 +0200)] 
gh-153903: Fix ctypes wrap_dll_function() with string annotations (#154042)

Call get_annotations() with eval_str=True.

3 days agogh-153906: Modernize pydoc HTML output (GH-153909)
Serhiy Storchaka [Sun, 19 Jul 2026 09:59:58 +0000 (12:59 +0300)] 
gh-153906: Modernize pydoc HTML output (GH-153909)

Follow-up of the HTML5 migration in bpo-10716: replace the layout
tables, the &nbsp;/<br> encoding of docstrings and the obsolete
<a name=...> anchors with semantic markup (header, section, h1-h4,
CSS multi-column lists, white-space: pre-wrap, id= anchors), and
restyle the pages after the python-docs-theme used by docs.python.org,
including dark mode support.  Members inherited from other classes
are now collapsed by default.  The pydoc API is unchanged; obsolete
arguments of HTMLDoc methods are accepted and ignored.  ServerHTMLDoc
in xmlrpc.server is updated to match.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>