]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Kumar Aditya [Mon, 18 May 2026 16:38:37 +0000 (22:08 +0530)]
gh-149816: fix thread safety of deletion of list slice (#149936)
Kumar Aditya [Mon, 18 May 2026 16:09:45 +0000 (21:39 +0530)]
gh-149816: fix `dict.clear()` race on split-table dict with non-embedded values (#149914)
sobolevn [Mon, 18 May 2026 15:39:54 +0000 (18:39 +0300)]
gh-149816: Fix a RC in `_random.Random.__init__` method (#149824)
Hugo van Kemenade [Mon, 18 May 2026 14:57:02 +0000 (17:57 +0300)]
gh-146531: Skip hanging `wm iconbitmap` test on macOS 26 Intel (#148032)
Maurycy Pawłowski-Wieroński [Mon, 18 May 2026 14:29:58 +0000 (16:29 +0200)]
gh-149464: Add `os.pidfd_getfd(pidfd, targetfd, flags=0)` function (#149465)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Nathan Goldbaum [Mon, 18 May 2026 13:24:06 +0000 (07:24 -0600)]
gh-149887: Install python3t.lib for GIL-enabled Windows install (GH-149900)
Nezuko Agent [Mon, 18 May 2026 08:28:28 +0000 (15:28 +0700)]
gh-149953: Fix null pointer dereference order in `code_objects.c` (#149956)
Move check before
Lukas Geiger [Mon, 18 May 2026 06:50:42 +0000 (07:50 +0100)]
gh-144140: Optimize len for frozen dict/set constants in optimizer (#149969)
Pieter Eendebak [Mon, 18 May 2026 06:37:12 +0000 (08:37 +0200)]
gh-138325: steal list items in `INTRINSIC_LIST_TO_TUPLE` opcode (#149960)
AN Long [Sun, 17 May 2026 10:09:19 +0000 (19:09 +0900)]
gh-149921: Fix reference leaks in _interpchannels and _interpqueues modules (#149922)
Farhan Saif [Sun, 17 May 2026 09:05:27 +0000 (04:05 -0500)]
gh-146452: Fix pickle segfault on concurrent mutation of dict in pickle (#146470)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Serhiy Storchaka [Sun, 17 May 2026 08:06:35 +0000 (11:06 +0300)]
gh-149916: Restore the commented out part of test_body_encode in test_email (GH-149917)
Mani Salahmand [Sun, 17 May 2026 06:01:50 +0000 (08:01 +0200)]
gh-149857: Clarify multiprocessing Process argument wording (GH-149919)
Use consistent 'picklable' wording
Savage Mechanic [Sat, 16 May 2026 18:24:41 +0000 (19:24 +0100)]
gh-67512: Document IMAP4.append() flags argument (#149907)
Victor Stinner [Sat, 16 May 2026 10:02:19 +0000 (12:02 +0200)]
gh-149879: Fix test_socket on Cygwin (#149913)
Disable SCM_RIGHTS, recvmsg(), sendmsg() and sethostname() on Cygwin.
Victor Stinner [Sat, 16 May 2026 08:50:55 +0000 (10:50 +0200)]
gh-149879: Fix test_os on Cygwin (#149910)
sobolevn [Sat, 16 May 2026 08:37:34 +0000 (11:37 +0300)]
gh-149816: Fix a race condition in `_PyBytes_FromList` with free-threading (#149909)
Victor Stinner [Fri, 15 May 2026 23:09:36 +0000 (01:09 +0200)]
gh-149879: Fix test_resource on Cygwin (#149903)
Setting RLIMIT_FSIZE or RLIMIT_CPU fails with EINVAL on Cygwin.
Victor Stinner [Fri, 15 May 2026 21:11:09 +0000 (23:11 +0200)]
gh-149879: Don't import msvcrt in _pyio on Cygwin (#149899)
The msvcrt extension module cannot be built on Cygwin.
Victor Stinner [Fri, 15 May 2026 20:49:37 +0000 (22:49 +0200)]
gh-149879: Fix test_tarfile on Cygwin (#149897)
On Cygwin, there is no root user (uid 0).
Fix test_realpath_limit_attack(): the test fails with ELOOP on
Cygwin.
Victor Stinner [Fri, 15 May 2026 19:32:10 +0000 (21:32 +0200)]
gh-149879: Fix test_signal on Cygwin (#149896)
* Check for SIG_BLOCK instead of pthread_sigmask() to decide if
SIG_BLOCK, SIG_UNBLOCK and SIG_SETMASK constants should be
converted to enums.
* Skip ITIMER_VIRTUAL and ITIMER_PROF tests on Cygwin: setitimer()
fails with ItimerError(EINVAL).
Stan Ulbrych [Fri, 15 May 2026 17:54:05 +0000 (18:54 +0100)]
gh-149567: Remove deprecated `shutil.ExecError` (#149568)
Victor Stinner [Fri, 15 May 2026 16:57:05 +0000 (18:57 +0200)]
gh-149879: Set thread name max length on Cygwin (#149890)
This change fix test_threading on Cygwin.
Victor Stinner [Fri, 15 May 2026 16:33:46 +0000 (18:33 +0200)]
gh-149879: Fix test_pwd on Cygwin (#149880)
On Cygwin, pwd.getpwuid(-1) returns an user ('Unknown+User').
sobolevn [Fri, 15 May 2026 16:30:40 +0000 (19:30 +0300)]
gh-142349: Add `help("lazy")` support (#149886)
Victor Stinner [Fri, 15 May 2026 15:55:34 +0000 (17:55 +0200)]
gh-149879: Fix sys.orig_argv[0] on Cygwin: add ".exe" suffix (#149885)
Carlo Bramini [Fri, 15 May 2026 14:29:26 +0000 (16:29 +0200)]
gh-149831: Fix ctypes DLL library name on Cygwin (#149832)
Co-authored-by: Victor Stinner <vstinner@python.org>
Hugo van Kemenade [Fri, 15 May 2026 14:03:46 +0000 (17:03 +0300)]
CI: Move Homebrew dependencies into Brewfile (#148335)
Co-authored-by: Brett Cannon <brett@python.org>
Carlo Bramini [Fri, 15 May 2026 13:54:08 +0000 (15:54 +0200)]
gh-149833: Change DLL prefix to "cygpython" on Cygwin (#149834)
Co-authored-by: Victor Stinner <vstinner@python.org>
Steve Dower [Fri, 15 May 2026 13:43:41 +0000 (14:43 +0100)]
gh-149786: Fixes venvlauncher builds on Windows free-threaded (GH-149847)
Steve Dower [Fri, 15 May 2026 12:51:27 +0000 (13:51 +0100)]
gh-138489: Add build-details.json generation to PC/layout (GH-149153)
Victor Stinner [Fri, 15 May 2026 12:42:30 +0000 (14:42 +0200)]
gh-148200: Update Modules/_hacl/ for Cygwin (#149802)
This pulls an updated version of HACL* that fixes Lib_Memzero0.c on
Cygwin, via an upstream fix.
sobolevn [Fri, 15 May 2026 12:38:51 +0000 (15:38 +0300)]
gh-149816: Fix race condition in `memoryview` with free-threading (#149858)
Serhiy Storchaka [Fri, 15 May 2026 11:34:48 +0000 (14:34 +0300)]
gh-149801: Add IANA registered names and aliases with leading zeros (GH-149804)
Like IBM00858, CP00858, IBM01140, CP01140.
Victor Stinner [Fri, 15 May 2026 11:25:09 +0000 (13:25 +0200)]
gh-148675: Use a string for ctypes cparam tag (#149778)
Victor Stinner [Fri, 15 May 2026 11:22:40 +0000 (13:22 +0200)]
gh-148675: Reuse typecodes for array.array() error message (#149779)
array.array() error message now reuses array.typecodes, instead of
maintaining an hardcoded list of valid type codes.
Victor Stinner [Fri, 15 May 2026 11:04:50 +0000 (13:04 +0200)]
gh-149707: Fix compiler warning in _ctypes_test on strchr() (#149791)
Change my_strchr() return type to "const char*" (add "const").
Fix the compiler warning:
Modules/_ctypes/_ctypes_test.c: In function 'my_strchr':
Modules/_ctypes/_ctypes_test.c:451:12: warning: return discards
'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
451 | return strchr(s, c);
| ^~~~~~
When using C23, strchr(text, ch) return type is "const char*" if text
type is "const char*".
sobolevn [Fri, 15 May 2026 07:16:34 +0000 (10:16 +0300)]
gh-149763: Improve availablity docs in `select.rst` (#149764)
Seth Larson [Thu, 14 May 2026 21:10:39 +0000 (16:10 -0500)]
gh-149144: Use decodeURIComponent() for UTF-8 support in js_output() (GH-149157)
Zachary Ware [Thu, 14 May 2026 17:47:28 +0000 (12:47 -0500)]
gh-124111: Update Windows build to use Tcl/Tk 9.0.3 (GH-149477)
Petr Viktorin [Thu, 14 May 2026 16:47:52 +0000 (18:47 +0200)]
Link to existing rules in compound_stmts.rst (GH-149811)
In gh-138418, `!` was added to links to rules that don't exist in
the docs, in order to silence broken link warnings.
However, productionlist doesn't parse the `!`, which ends up in
the rendered documentation. (It's possible that gh-127835 broke
the `!` support.)
Replace the names with ones that appear in docs:
- `star_named_expression` in the grammar corresponds to
`flexible_expression` in the docs
- `star_named_expressions` in the grammar corresponds to
`flexible_expression_list` in the docs
- `named_expression` in the grammar corresponds to
`assignment_expression` in the docs
Having two sets of names isn't great of course. Consolidating them
is tracked in (subissues of) gh-127833.
Serhiy Storchaka [Thu, 14 May 2026 10:10:28 +0000 (13:10 +0300)]
gh-148821: Add more tests for invalid XML encodings (GH-149820)
Stan Ulbrych [Wed, 13 May 2026 23:21:03 +0000 (00:21 +0100)]
gh-149698: Update bundled expat to 2.8.1 (GH-149699)
Carlo Bramini [Wed, 13 May 2026 21:50:24 +0000 (23:50 +0200)]
gh-148758: Fix dynamic loading file extensions for Cygwin (#148759)
Co-authored-by: Victor Stinner <vstinner@python.org>
Carlo Bramini [Wed, 13 May 2026 20:05:27 +0000 (22:05 +0200)]
gh-148575: Use /dev/fd/ to read the set of file descriptors on Cygwin (#148576)
Carlo Bramini [Wed, 13 May 2026 19:09:24 +0000 (21:09 +0200)]
gh-148461: Use arc4random_buf() in mimalloc on Cygwin (#148462)
See also issue #113141.
Kumar Aditya [Wed, 13 May 2026 17:33:59 +0000 (23:03 +0530)]
gh-148906: fix performance scaling of descriptors on free-threading (#148915)
Gregory P. Smith [Wed, 13 May 2026 17:33:43 +0000 (10:33 -0700)]
gh-87451: Apply CVE-2021-4189 PASV fix to ftplib.ftpcp() (GH-149648)
ftpcp() called parse227() directly and passed the source server's
self-reported PASV IPv4 address to the target server's PORT command,
bypassing the CVE-2021-4189 fix that was applied only to FTP.makepasv().
A malicious source FTP server could use this to redirect the target
server's data connection to an arbitrary host:port (SSRF).
ftpcp() now uses the source server's actual peer address, honoring the
existing trust_server_pasv_ipv4_address opt-out, the same as makepasv().
Thanks to Qi Ding at Aurascape AI for the report. (GHSA-w8c5-q2xf-gf7c)
Petr Viktorin [Wed, 13 May 2026 17:14:05 +0000 (19:14 +0200)]
gh-149685: Use the _Py prefix for private C macros (GH-149686)
Barry Warsaw [Wed, 13 May 2026 16:45:25 +0000 (09:45 -0700)]
gh-149504: Fix re-entrancy bug when .pth/.start file invokes site.addsitedir() (#149659)
* Add re-entrant tests for gh-149504
* Add end-to-end integration test coverage
This ensures that future whitebox internal test changes do not regress the
public surface semantics.
* Implement a state class to process .pth and .start files
By using this state class and managing implicit and explicit batching, we make it structurally
impossible to get bitten by re-entrant site startup processing.
Fixes #149504
Petr Viktorin [Wed, 13 May 2026 16:35:50 +0000 (18:35 +0200)]
gh-140550: Update xxlimited with 3.15 limited API (GH-142827)
Victor Stinner [Wed, 13 May 2026 14:55:45 +0000 (16:55 +0200)]
gh-149776: Skip UDP Lite tests if it's not supported (#149777)
Fix test_socket on Linux kernel 7.1 and newer: skip UDP Lite tests if
it's not supported.
Hugo van Kemenade [Wed, 13 May 2026 11:03:33 +0000 (14:03 +0300)]
Run mypy with four worker processes and uv (#149726)
Serhiy Storchaka [Wed, 13 May 2026 10:40:47 +0000 (13:40 +0300)]
gh-148821: Add more strict tests for XML encodings (GH-149765)
Exclude encodings like 'utf-8-sig', 'iso2022-jp' and 'hz' from the list of
supported encodings.
Ruben Vorderman [Wed, 13 May 2026 10:20:33 +0000 (12:20 +0200)]
bpo-45509: Check gzip headers for corrupted fields (GH-29028)
Check the header checksum it the HCRC field is present.
scoder [Wed, 13 May 2026 10:10:37 +0000 (12:10 +0200)]
gh-148829: Add PySentinel_CheckExact() (#149725)
sobolevn [Wed, 13 May 2026 08:48:01 +0000 (11:48 +0300)]
gh-149720: Fix docs for `mimetypes.MimeType.add_type` method (#149731)
gh-149720: Fix docs for `mimetypes.MimeType.add_type` method`
John Merkel [Wed, 13 May 2026 07:59:57 +0000 (00:59 -0700)]
gh-149701: Fully silence potential `hash -r` error (GH-149702)
Jelle Zijlstra [Wed, 13 May 2026 03:00:01 +0000 (20:00 -0700)]
gh-149574: Document that is_typeddict, is_protocol, is_dataclass, isclass return False for generic aliases (#149604)
Jelle Zijlstra [Wed, 13 May 2026 02:59:09 +0000 (19:59 -0700)]
gh-149642: Fix interaction between exec and lazy_imports=all (#149643)
Maurycy Pawłowski-Wieroński [Tue, 12 May 2026 23:46:21 +0000 (01:46 +0200)]
gh-149718: Aggregate same stack frames in Tachyon in some collectors (#149719)
Sergey B Kirpichev [Tue, 12 May 2026 21:34:37 +0000 (00:34 +0300)]
gh-115119: Removed bundled copy of the libmpdec (GH-133964)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Zachary Ware <zach@python.org>
David Huggins-Daines [Tue, 12 May 2026 19:46:46 +0000 (15:46 -0400)]
gh-134837: Correct and improve base85 documentation for base64 and binascii modules (GH-145843)
sobolevn [Tue, 12 May 2026 17:29:46 +0000 (20:29 +0300)]
gh-149600: Remove deprecated `asyncio.iscoroutinefunction` function (#149601)
Shamil [Tue, 12 May 2026 17:27:00 +0000 (20:27 +0300)]
gh-148701: Add missing test coverage for asyncio.graph (#148702)
Sergey Miryanov [Tue, 12 May 2026 17:17:35 +0000 (22:17 +0500)]
GH-149501: Fix compilation warning in `_YIELD_VALUE` uop (#149502)
Stan Ulbrych [Tue, 12 May 2026 16:11:34 +0000 (17:11 +0100)]
gh-149595: Remove the `sys._enablelegacywindowsfsencoding()` function (#149596)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Berker Peksag [Tue, 12 May 2026 16:07:15 +0000 (19:07 +0300)]
Remove myself from CODEOWNERS (#149727)
Thank you!
stratakis [Tue, 12 May 2026 15:42:44 +0000 (17:42 +0200)]
gh-139808: Add branch protections for aarch64 in asm_trampoline.S (#130864)
Apply protection against ROP/JOP attacks for aarch64 on asm_trampoline.S.
The BTI flag must be applied in assembler sources for this class
of attacks to be mitigated on newer aarch64 processors.
See also:
https://sourceware.org/annobin/annobin.html/Test-branch-protection.html
and
https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/enabling-pac-and-bti-on-aarch64
Co-authored-by: Victor Stinner <vstinner@python.org>
sobolevn [Tue, 12 May 2026 13:40:21 +0000 (16:40 +0300)]
gh-149720: Remove support for undotted `ext` in `mimetypes.MimeType.add_type` (#149721)
Thomas Kowalski [Tue, 12 May 2026 10:47:39 +0000 (12:47 +0200)]
gh-149676: Fix hash(frozendict | frozendict) (#149675)
Fix new_dict_impl() to properly initialize ma_hash on frozendict.
Co-authored-by: Victor Stinner <vstinner@python.org>
sobolevn [Tue, 12 May 2026 08:40:51 +0000 (11:40 +0300)]
Update mypy to 2.1.0 (#149709)
Victorien [Tue, 12 May 2026 02:45:51 +0000 (04:45 +0200)]
gh-148669: Clarify `__reduce__()` module lookup behavior (#148670)
Mike Edmunds [Mon, 11 May 2026 22:20:09 +0000 (15:20 -0700)]
gh-128110: Fix rfc2047 whitespace handling in email parser address headers (#130749)
RFC 2047 Section 6.2 requires that "any 'linear-white-space' that
separates a pair of adjacent 'encoded-word's is ignored." The modern
header value parser correctly implements that for unstructured headers,
but had missed a case in structured headers. This could cause a parsed
address header to include extraneous spaces in a display-name.
Switch to @bitdancer's fix from review feedback. Recharacterize space
between ews as fws after parsing in get_phrase.
RDM: This fix is dependent on the fact that "subsequent" atoms will never have
leading whitespace because that's been consumed already. I don't think
it's worth adding extra code for the possibility of leading whitespace
because the parser won't produce it. It's a bit of parser fragility in the
face of code changes, but I think that's a minor concern given the
parser design (which is that it consumes whitespace greedily)
Co-authored-by: R David Murray <rdmurray@bitdance.com>
Alper [Mon, 11 May 2026 15:39:55 +0000 (08:39 -0700)]
gh-145235: Make dict watcher API thread-safe for free-threaded builds (gh-145233)
In free-threaded builds, concurrent calls to PyDict_AddWatcher, PyDict_ClearWatcher, PyDict_Watch, and PyDict_Unwatch can race on the shared callback array and the per-dict watcher tags. This change adds a mutex to serialize watcher registration and removal, atomic operations for tag updates, and atomic acquire/release synchronization for callback dispatch in _PyDict_SendEvent.
David Ellis [Mon, 11 May 2026 15:28:23 +0000 (16:28 +0100)]
gh-149614 - Restore deepcopiability of argparse.ArgumentParser instances (#149617)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Savannah Ostrowski <savannah@python.org>
Manoj K M [Mon, 11 May 2026 15:27:16 +0000 (20:57 +0530)]
Fix incorrect sentence in stable.rst (GH-149684)
sobolevn [Mon, 11 May 2026 15:03:57 +0000 (18:03 +0300)]
gh-149634: Fix removed docs from `TarFile.tarfile` to `TarInfo.tarfile` (#149680)
Guo Ci [Mon, 11 May 2026 14:21:03 +0000 (10:21 -0400)]
gh-140924: In locale module, add missing names to __all__ (GH-140925)
Jelle Zijlstra [Mon, 11 May 2026 13:08:12 +0000 (06:08 -0700)]
gh-144957: Fix lazy imports + module __getattr__ (GH-149624)
Sergey B Kirpichev [Mon, 11 May 2026 13:05:50 +0000 (16:05 +0300)]
gh-149402: Don't assume single-character type codes (struct/array/ctypes) (#149483)
In the struct docs, section "Format Characters" was renamed to "Type
Codes".
Co-authored-by: Victor Stinner <vstinner@python.org>
Árni Már Jónsson [Mon, 11 May 2026 11:54:09 +0000 (11:54 +0000)]
gh-149663: fix typo in `unittest` docs (#149670)
`hastattr` -> `hasattr`
Jonathan Dung [Mon, 11 May 2026 11:14:54 +0000 (19:14 +0800)]
gh-146061: Clarify indent=None in json docs (GH-146095)
sobolevn [Mon, 11 May 2026 10:54:49 +0000 (13:54 +0300)]
gh-149634: Remove deprecated and unused `tarfile.Tarfile.tarfile` attr (GH-149635)
pengyu lee [Mon, 11 May 2026 08:28:19 +0000 (16:28 +0800)]
Fix typos in C API documentation (GH-149588)
Michael Droettboom [Mon, 11 May 2026 01:44:59 +0000 (21:44 -0400)]
gh-112821: Fix rlcompleter failures on objects with descriptors (#149577)
* gh-112821: Fix rlcompleter failures on objects with descriptors
* Confirm no accesses
Barry Warsaw [Mon, 11 May 2026 00:25:39 +0000 (17:25 -0700)]
gh-75723: Fix double evaluation of .pth and .site files in venvs (#149583)
* Idempotent `.pth` execution in `site.addsitedir`
* potentially fix monkeypatch leak?
* fix blind copy paste of recommendation
* Update 2026-03-31-16-15-15.gh-issue-75723.BZ4Rsn.rst
* fix implicit merge conflict with
24c4aecc1674414d3dc3238625802778c4ad29d2
* Add failing tests for gh-75723
Based on @asottle branch !asottle-gh-75723 but refactored for `main`.
This will need a different backport.
* Repair gh-75723
The original fix is here: https://github.com/python/cpython/pull/147951
but I'm refactoring a bit for `main`.
* Refactor _make_mod() so we can use it to create package modules too
* Add myself to CODEOWNERS for the site module
---------
Co-authored-by: anthony sottile <asottile@umich.edu>
Co-authored-by: Filipe Laíns <lains@riseup.net>
sobolevn [Mon, 11 May 2026 00:05:56 +0000 (03:05 +0300)]
gh-149598: Remove `strm` argument support from `logging` handlers (#149599)
gh-149598: Remove *strm* argument support from `logging` handlers
Sergey B Kirpichev [Sun, 10 May 2026 22:22:16 +0000 (01:22 +0300)]
gh-149083: use sentinel to fix _functools.reduce() signature (#149591)
Jelle Zijlstra [Sun, 10 May 2026 20:43:57 +0000 (13:43 -0700)]
gh-139489: Add is_valid_text to xml.__all__ (#149641)
Omkar Kabde [Sun, 10 May 2026 17:41:37 +0000 (23:11 +0530)]
gh-149611: Explain return values for `Path.write_text()` and `Path.write_bytes()` (#149629)
specify return explanation
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Stan Ulbrych [Sun, 10 May 2026 17:36:26 +0000 (18:36 +0100)]
gh-149018: Use `XML_SetHashSalt16Bytes` in `pyexpat`/`_elementtree` when possible (#149023)
ByteFlow [Sun, 10 May 2026 13:42:04 +0000 (21:42 +0800)]
gh-148441: Avoid integer overflow in Expat's CharacterDataHandler (#148904)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Pieter Eendebak [Sun, 10 May 2026 02:52:52 +0000 (04:52 +0200)]
gh-149436: Speed up inspect.getattr_static for the common-metaclass case (#149437)
Consecutive MRO entries usually share their metaclass, so call
_shadowed_dict at most once per distinct metaclass.
Cody Maloney [Sat, 9 May 2026 21:39:01 +0000 (14:39 -0700)]
gh-139871: Fix 3.15 bytearray.take_bytes example (#149520)
Currently:
```python
buffer = bytearray(b'abc\ndef')
n = buffer.find(b'\n')
data = bytes(buffer[:n + 1])
del buffer[:n + 1]
assert data == b'abc'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
assert data == b'abc'
^^^^^^^^^^^^^^
AssertionError
```
Adding in the `\n` makes the two match:
```python
buffer = bytearray(b'abc\ndef')
n = buffer.find(b'\n')
data = bytes(buffer[:n + 1])
del buffer[:n + 1]
assert data == b'abc\n'
assert buffer == bytearray(b'def')
buffer = bytearray(b'abc\ndef')
n = buffer.find(b'\n')
data = buffer.take_bytes(n + 1)
assert data == b'abc\n'
assert buffer == bytearray(b'def')
```
Manoj K M [Sat, 9 May 2026 21:31:55 +0000 (03:01 +0530)]
Fix minor typos in unicode.rst (#149587)
Max Schmitt [Sat, 9 May 2026 14:14:29 +0000 (07:14 -0700)]
gh-149388: Make asyncio `PipeHandle.close` idempotent (#149518)
László Kiss Kollár [Sat, 9 May 2026 13:05:46 +0000 (14:05 +0100)]
gh-149430: Fix edge-cases in `profiling.sampling` outputs (#149431)
The line highlights on the heatmap are driven by the URL hash and the
`:target` selector. When clicking a caller/callee link for the line that
was already selected, the hash doesn't change, so the browser keeps the
existing target state and doesn't restart the animation. Due to this the
highlight only works the first time.
With this fix, line navigation goes through JavaScript. If the target
URL already points to the current location, the highlight is replayed by
clearing the animation, forcing style recalculation, and restoring it.
The `baseline_self` variable isn't initialized for structural elided
roots. This variable is accessed later unconditionally and leads to a
crash.
The child process ends up being invoked with `--diff_flamegraph` instead
of the correct argument.
sobolevn [Sat, 9 May 2026 08:33:09 +0000 (11:33 +0300)]
gh-149530: Remove `symtable.Class.get_methods` deprecated method (#149531)
sobolevn [Sat, 9 May 2026 07:55:09 +0000 (10:55 +0300)]
gh-149083: Convert `_initial_missing` for pure py `reduce` to `sentinel` (#149536)