Commit Graph

124358 Commits

Author SHA1 Message Date
Miss Islington (bot) 8a759c235c
[3.13] gh-127906: Add missing sys import to test_cppext (GH-132902) (#132904)
gh-127906: Add missing sys import to test_cppext (GH-132902)
(cherry picked from commit 9cba14881b)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-04-25 08:42:57 +00:00
Miss Islington (bot) 293f2895d5
[3.13] gh-98347: Add links to python-isal in the documentation (GH-98637) (#132894)
gh-98347: Add links to python-isal in the documentation (GH-98637)

Clearly note that this is primarily intended for users for who zlib/gzip is a bottleneck.
(cherry picked from commit b1fc8b69ec)

Co-authored-by: Ruben Vorderman <r.h.p.vorderman@lumc.nl>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-04-25 03:09:58 +01:00
Miss Islington (bot) 9953971924
[3.13] Differentiate bitwise OR from the word "or" (GH-132890) (#132891)
Differentiate bitwise OR from the word "or" (GH-132890)
(cherry picked from commit 15ff60aff0)

Co-authored-by: Brett Cannon <brett@python.org>
2025-04-24 22:11:18 +00:00
Serhiy Storchaka bf6c74dc7a
[3.13] Use os.openpty() instead of pty.openpty() in test_ioctl (GH-132878)
pty.openpty() does not work on Android, and it is easier to check
availability of os.openpty.
2025-04-24 18:47:01 +03:00
Miss Islington (bot) 52e0f564d0
[3.13] Fix a grammar error in the `Py_ALWAYS_INLINE` doc (GH-129304) (#132877)
Co-authored-by: Kuba_Z2 <77853483+KubaZ2@users.noreply.github.com>
2025-04-24 14:27:41 +00:00
Miss Islington (bot) 9ec6f77f8a
[3.13] gh-128185: Align Decimal docs with spec (case irrelevant for nan/inf) (GH-128323) (#132875)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2025-04-24 14:09:03 +00:00
Miss Islington (bot) bd4a39f125
[3.13] gh-122399: change webbrowser.rst to better describe the contents of controller object (GH-122407) (#132874)
Co-authored-by: Jordi Burguet-Castell <jordi.burguet.castell@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-04-24 14:03:02 +00:00
Miss Islington (bot) b220c1c0a4
[3.13] gh-109981: Resolve situation on iOS regarding fd_count. (GH-132823) (#132824)
Modifies the test helper that counts the list of open file descriptors to use
the optimised ``/dev/fd`` approach on all Apple platforms, not just macOS. This
avoids crashes caused by guarded file descriptors.
(cherry picked from commit 862fd89036)

Co-authored-by: John <johnzhou721@gmail.com>
2025-04-23 21:40:25 +00:00
Serhiy Storchaka f8d4ca42ae
[3.13] gh-83994, gh-132843: Fix and improve test_ioctl (GH-132848) (GH-132850)
* Skip test_ioctl_tcflush if termios.TCFLSH is not available.
* Do not skip ALL ioctl() tests when /dev/tty is not available.
(cherry picked from commit 4b4b9fbb06)
2025-04-23 19:17:51 +00:00
Miss Islington (bot) abbc44c557
[3.13] gh-132742: Update documentation for the fcntl module (GH-132765) (GH-132832)
(cherry picked from commit 5f50541ebd)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-04-23 21:08:46 +03:00
Miss Islington (bot) 341b86e095
[3.13] gh-132713: Fix typing.Union[index] race condition (GH-132802) (#132839)
gh-132713: Fix typing.Union[index] race condition (GH-132802)

Add union_init_parameters() helper function. Use a critical section
to initialize the 'parameters' member.
(cherry picked from commit dc3e9638c2)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-04-23 14:12:03 +00:00
Victor Stinner 3de0f55f34
[3.13] gh-132713: Fix repr(list) race condition (#132801) (#132809)
Hold a strong reference to the item while calling repr(item).

(cherry picked from commit a4ea80d523)
2025-04-23 15:44:33 +02:00
sobolevn 3a130c1786
[3.13] Update `pre-commit` repos (GH-132792) (#132804)
(cherry picked from commit 87b1ea016b)
2025-04-22 15:57:34 +00:00
Miss Islington (bot) e140e6ef78
[3.13] gh-132769: Refactor possible read-out-of-bounds in `lexer.c` (GH-132770) (#132788)
gh-132769: Refactor possible read-out-of-bounds in `lexer.c` (GH-132770)
(cherry picked from commit ea8ec95cfa)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-04-21 22:42:55 +00:00
Gregory P. Smith cdabbc126f
[3.13] gh-122179: Fix hashlib.file_digest and non-blocking I/O (GH-132787)
gh-122179: Fix hashlib.file_digest and non-blocking I/O (GH-122183)

* Fix hashlib.file_digest and non-blocking I/O
* Add documentation around this behavior
* Add versionchanged

(cherry picked from commit 2b47f46d7d)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2025-04-21 21:55:57 +00:00
Peter Bierma bb59fdec71
[3.13] gh-132747: Fix `NULL` dereference when calling a method's `__get__` manually (GH-132772) (#132786)
(cherry picked from commit fa70bf8593)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-04-21 21:38:51 +00:00
Miss Islington (bot) d8b9011702
[3.13] gh-85583: Add an overview of formatted string literals (f-strings) to ``str`` (GH-132689) (#132767)
gh-85583: Add an overview of formatted string literals (f-strings) to ``str`` (GH-132689)
(cherry picked from commit fee808936f)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-04-21 08:55:13 +01:00
Serhiy Storchaka 3c29fb2974
[3.13] gh-132753: Argument Clinic: Fix support of c_default for the bool converter (GH-132754) (GH-132766)
(cherry picked from commit 78cfee6f09)
2025-04-21 07:10:31 +00:00
Miss Islington (bot) c709d3b503
[3.13] gh-132742: Add more tests for fcntl.ioctl() (GH-132756) (GH-132764)
Test with different types of argument: integer, mutable and immutable
buffers, immutable buffer with mutable_flag set to false.
(cherry picked from commit a04390b4da)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-04-21 06:49:45 +00:00
Miss Islington (bot) 62663bfed5
[3.13] gh-129098: avoid using content of `_pyrepl/__main__.py` when reporting tracebacks (GH-130721) (#132755)
gh-129098: avoid using content of `_pyrepl/__main__.py` when reporting tracebacks (GH-130721)
(cherry picked from commit 492e3e6976)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-20 17:48:16 +00:00
Miss Islington (bot) 5ab628fc65
[3.13] gh-129327: revise hashlib documentation to account for FIPS removing sha1 (GH-132729) (#132740)
gh-129327: revise hashlib documentation to account for FIPS removing sha1 (GH-132729)

* gh-129327: revise hashlib documentation to account for FIPS removing sha1

More generally, the current documentation is a bit scattered, talking
about what terms are "equal" despite those terms not being very
interesting and given the term "secure hash", probably wrong (because
md5 and sha1 are not secure anymore).

Let's talk about cryptographically secure instead, and note that two of
them aren't. And then we can also link to the source for NIST going
through the removal process for SHA1.

* Add Gregors Suggestion

* Clean up

---------
(cherry picked from commit a16586c9e7)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Eli Schwartz <eschwartz@gentoo.org>
2025-04-20 01:12:26 +00:00
Peter Bierma 47c8df6172
[3.13] gh-132673: Fix a crash with zero-alignment in `ctypes.Structure` (#132695) 2025-04-19 14:29:05 +00:00
Miss Islington (bot) 38f305b9db
[3.13] Docs: Fix REPL example in `Doc/library/shutil.rst` (GH-132700) (#132728)
Docs: Fix REPL example in `Doc/library/shutil.rst` (GH-132700)
(cherry picked from commit e154e4db36)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-04-19 14:20:46 +00:00
Miss Islington (bot) 83cb89b941
[3.13] gh-129719: Restore missing `socket.CAN_RAW_ERR_FILTER` on Linux (GH-129721) (#132702)
gh-129719: Restore missing `socket.CAN_RAW_ERR_FILTER` on Linux (GH-129721)
(cherry picked from commit ce31ae5209)

Co-authored-by: Jeroen Bogers <11465689+jbogers@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-04-18 20:49:23 +00:00
Miss Islington (bot) 10f37b36b4
[3.13] gh-132396: Resolve 'redefinition of unused name' errors in ``Lib/test/`` (GH-132397) (#132699)
gh-132396: Resolve 'redefinition of unused name' errors in ``Lib/test/`` (GH-132397)
(cherry picked from commit 1d5dc5f1c3)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-04-18 20:35:35 +01:00
Miss Islington (bot) 151828d520
[3.13] Minor doc edit: Make multinomial() the first math example (gh-132697) (gh-132698) 2025-04-18 17:47:25 +00:00
Łukasz Langa a37d719d37
[3.13] gh-129958: Properly disallow newlines in format specs in single-quoted f-strings (GH-130063) (GH-132692)
(cherry picked from commit 2f8b08da47)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2025-04-18 17:41:42 +02:00
Miss Islington (bot) ca2e1a1e1c
[3.13] gh-130861: Add clarification to the perf docs on optimization levels (GH-131098) (#132687) 2025-04-18 13:48:23 +00:00
Miss Islington (bot) b3d4980c56
[3.13] gh-132553: Build the perf tool without buildid cache (GH-132663) (GH-132681)
(cherry picked from commit e01e582902)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2025-04-18 12:51:02 +00:00
Miss Islington (bot) b78728210c
[3.13] gh-132674: fix `_hashopenssl.c` compiler warnings on free-threaded build (GH-132675) (#132677)
gh-132674: fix `_hashopenssl.c` compiler warnings on free-threaded build (GH-132675)
(cherry picked from commit 2df0f88047)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-18 12:17:36 +00:00
Miss Islington (bot) bfba11ad11
[3.13] gh-132668: Remove outdated description of `POP_JUMP_*` instructions (GH-132669) (#132680)
gh-132668: Remove outdated description of `POP_JUMP_*` instructions (GH-132669)
(cherry picked from commit 7e2672cfcf)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-04-18 14:14:40 +02:00
Miss Islington (bot) 7d4c00e7c5
[3.13] Docs: Migrate entirely to PSF hosted plausible for analytics (GH-132648) (#132660)
Docs: Migrate entirely to PSF hosted plausible for analytics (GH-132648)
(cherry picked from commit 1d529cbc89)

Co-authored-by: Ee Durbin <ewdurbin@gmail.com>
2025-04-18 05:02:18 +01:00
Miss Islington (bot) afd865aad6
gh-132649: Allow passing --include-tcltk to PC\layout on Windows ARM64 (GH-132650)
(cherry picked from commit b87189deae)

Co-authored-by: Steve Dower <steve.dower@python.org>
2025-04-17 19:37:30 +00:00
Bartosz Sławecki 582d1ef463
[3.13] gh-130070: Fix `exec(<string>, closure=<non-None>)` unexpected path (GH-130071) (#132627)
gh-130070: Fix `exec(<string>, closure=<non-None>)` unexpected path (#130071)

Fixed an assertion error (so, it could be reproduced only in builds with assertions enabled)
for `exec` when the `source` argument is a string and the `closure` argument is not `None`.

Co-authored-by: sobolevn <mail@sobolevn.me>
(cherry picked from commit 954b2cf031)
2025-04-17 09:21:56 +00:00
Miss Islington (bot) db7ad1c89f
[3.13] gh-132608: Fix a sample code coloring for ast.While (GH-132609) (#132612) 2025-04-16 21:02:39 +01:00
Miss Islington (bot) f9578dc31f
[3.13] typing docs: Clarify Protocol / runtime_checkable docs (GH-132606) (#132607)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-04-16 17:50:31 +00:00
Miss Islington (bot) 88d95c3529
[3.13] typing: Add missing test case for Protocol inheritance (GH-132597) (#132603)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-04-16 15:45:29 +00:00
Miss Islington (bot) ff3f6588c3
[3.13] gh-130052: Fix search_map_for_section() error handling (GH-132594) (#132598)
gh-130052: Fix search_map_for_section() error handling (GH-132594)

* Don't call close() if the file descriptor is negative.
* If close() fails, chain the existing exception.
(cherry picked from commit 014c7f9047)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-04-16 14:21:58 +00:00
Miss Islington (bot) ee8f681252
[3.13] gh-130941: Fix `configparser` parsing values with `allow_no_value` and `interpolation` set (GH-130949) (#132588)
gh-130941: Fix `configparser` parsing values with `allow_no_value` and `interpolation` set (GH-130949)
(cherry picked from commit c35c7353eb)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-04-16 14:19:46 +02:00
Miss Islington (bot) 8128bcfa08
[3.13] gh-127591: Fix altering environment in test_urllib2 (unsetting no_proxy) (GH-132584) (GH-132585)
(cherry picked from commit 8b7cb947c5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-04-16 11:06:53 +00:00
Miss Islington (bot) 08faa2aeac
[3.13] gh-132535: Fix resource warnings in test_timeout (GH-132572) (GH-132580)
They were emitted if internet connection was not available.
(cherry picked from commit 82f74eb234)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-04-16 07:44:47 +00:00
Miss Islington (bot) 2a1a337d28
[3.13] Docs: Synchronise ``indexsidebar.html`` with docsbuild-scripts (GH-132567) (#132573)
Docs: Synchronise ``indexsidebar.html`` with docsbuild-scripts (GH-132567)
(cherry picked from commit 4f10b93d1b)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-04-15 23:42:27 +01:00
Miss Islington (bot) a3a3bfd01c
[3.13] gh-114713: Handle case of an empty string passed to `zoneinfo.ZoneInfo` (GH-114731) (#132563)
gh-114713: Handle case of an empty string passed to `zoneinfo.ZoneInfo` (GH-114731)
(cherry picked from commit 884df116d7)

Co-authored-by: Bogdan Romanyuk <65823030+wrongnull@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2025-04-15 19:05:28 +00:00
Miss Islington (bot) 11617d5a7f
[3.13] Fix argument order in multinomial() example (gh-132557) (gh-132560) 2025-04-15 16:56:57 +00:00
Miss Islington (bot) 6d48194d9f
[3.13] gh-132176: Fix crash on `type()` when `tuple` subclass passed as `bases` (GH-132212) (#132548)
gh-132176: Fix crash on `type()` when `tuple` subclass passed as `bases` (GH-132212)
(cherry picked from commit b6c552f9e6)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-04-15 11:38:20 +00:00
Serhiy Storchaka f218549afc
[3.13] gh-124476: Fix decoding from the locale encoding in the C.UTF-8 locale (GH-132477) (ПР-132528)
(cherry picked from commit 102f825c51)
2025-04-14 18:59:07 +00:00
Miss Islington (bot) bdff88b9aa
[3.13] gh-131803: Clarify that you must register signal handlers for set_wakeup_fd (GH-131859) (#132522)
gh-131803: Clarify that you must register signal handlers for set_wakeup_fd (GH-131859)
(cherry picked from commit 939476bbbb)

Co-authored-by: Jeremy Fleischman <jeremyfleischman@gmail.com>
2025-04-14 16:52:36 +00:00
Victor Stinner 866b6359e5
[3.13] gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040) (#132521)
gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040)

(cherry picked from commit 8768df2fe9)

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
2025-04-14 16:48:40 +00:00
Serhiy Storchaka d321b6ec82
[3.13] gh-132099: Harmonize Bluetooth address handling (GH-132486) (GH-132497)
Now all protocols always accept the Bluetooth address as string and
getsockname() always returns the Bluetooth address as string.

* BTPROTO_SCO now accepts not only bytes, but str.
* BTPROTO_SCO now checks address for embedded null.
* On *BSD, BTPROTO_HCI now accepts str instead of bytes.
* On FreeBSD, getsockname() for BTPROTO_HCI now returns str instead of bytes.
* On NetBSD and DragonFly BSD, BTPROTO_HCI now checks address for embedded null.
(cherry picked from commit 1fc1df8dcc)
2025-04-14 19:36:04 +03:00
Miss Islington (bot) a50aa3325b
[3.13] gh-132515: de-duplicate `test_dataclass_derived_generic_from_slotted_base` (GH-132516) (#132518)
gh-132515: de-duplicate `test_dataclass_derived_generic_from_slotted_base` (GH-132516)
(cherry picked from commit 45c447bf91)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-14 15:29:20 +00:00