]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Sat, 3 May 2025 02:38:35 +0000 (04:38 +0200)]
gh-91156: Document how TextIOWrapper interacts with UTF-8 mode (GH-132885)
Document how TextIOWrapper interacts with UTF-8 mode
(cherry picked from commit
245cd6c53278006fa34fd7799d32f0884eb7e75d )
Co-authored-by: Malcolm Smith <smith@chaquo.com>
Miss Islington (bot) [Fri, 2 May 2025 17:26:38 +0000 (19:26 +0200)]
[3.13] gh-132995: Upgrade bundled pip to 25.1.1 (gh-133308)
gh-132995: Upgrade bundled pip to 25.1.1 (gh-132997)
* gh-132995: Upgrade bundled pip to 25.1.1
(cherry picked from commit
a512905e156bc09a20b171686ac129e66c13f26a )
Co-authored-by: Paul Moore <p.f.moore@gmail.com>
Miss Islington (bot) [Fri, 2 May 2025 17:26:26 +0000 (19:26 +0200)]
[3.13] gh-112936: Fix IDLE: no Shell menu item in single-process mode (GH-126598) (GH-133310)
(cherry picked from commit
7e7e49be78e26d0a3b861a04bbec1635aabb71b9 )
Co-authored-by: Zhikang Yan <2951256653@qq.com>
Miss Islington (bot) [Fri, 2 May 2025 16:10:32 +0000 (18:10 +0200)]
[3.13] gh-133290: Use PyObject_SetAttr to set _type_ (GH-133292) (GH-133295)
gh-133290: Use PyObject_SetAttr to set _type_ (GH-133292)
(cherry picked from commit
2590774c9bb96ec75ca8a13b0c061fcc9db3eb65 )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Fri, 2 May 2025 13:27:54 +0000 (15:27 +0200)]
[3.13] gh-132385: Fix instance error suggestions trigger potential exceptions in `traceback` (GH-132387) (#133297)
gh-132385: Fix instance error suggestions trigger potential exceptions in `traceback` (GH-132387)
(cherry picked from commit
641253cfac789e57c2b0c16047bdbf355535f60f )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Fri, 2 May 2025 13:27:30 +0000 (15:27 +0200)]
[3.13] gh-133210: Fix `test_descr` in `--without-doc-strings` mode (GH-133294) (#133298)
gh-133210: Fix `test_descr` in `--without-doc-strings` mode (GH-133294)
(cherry picked from commit
ba16ba3a18e86e094bcd215892b49fb08c74ec0a )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Fri, 2 May 2025 12:24:12 +0000 (14:24 +0200)]
[3.13] Docs: delete title links in `turtle.rst` and `typing.rst` (GH-133283) (#133293)
Co-authored-by: Yongzi Li <1538321957@qq.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Fri, 2 May 2025 10:36:35 +0000 (12:36 +0200)]
[3.13] gh-133210: Fix `test_pydoc` in `--without-doc-strings` mode (GH-133271) (#133288)
gh-133210: Fix `test_pydoc` in `--without-doc-strings` mode (GH-133271)
(cherry picked from commit
4912b29166eb23fc7219dbd39d5af0b69bd1a085 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Tomas R. [Fri, 2 May 2025 07:28:28 +0000 (09:28 +0200)]
[3.13] gh-130197: Improve test coverage of msgfmt.py (GH-133048) (GH-133255)
(cherry picked from commit
c73d46076ee0a6f32b472f9dfcf0e4245cc1c462 )
Miss Islington (bot) [Fri, 2 May 2025 03:06:07 +0000 (05:06 +0200)]
[3.13] gh-119605: Respect `follow_wrapped` for `__init__` and `__new__` when getting class signature with `inspect.signature` (GH-132055) (#133277)
gh-119605: Respect `follow_wrapped` for `__init__` and `__new__` when getting class signature with `inspect.signature` (GH-132055)
(cherry picked from commit
b8633f9aca9b198e5592106b649389d638cbc620 )
Co-authored-by: Xuehai Pan <XuehaiPan@pku.edu.cn>
Miss Islington (bot) [Thu, 1 May 2025 16:36:12 +0000 (18:36 +0200)]
[3.13] gh-133210: Fix `test_inspect` in `--without-doc-strings` mode (GH-133250) (#133263)
gh-133210: Fix `test_inspect` in `--without-doc-strings` mode (GH-133250)
(cherry picked from commit
27e011455d38facfeca8aeaeed505cbd987f8509 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Thu, 1 May 2025 11:36:06 +0000 (13:36 +0200)]
[3.13] gh-130655: Add a test for big-endian MO files in gettext (GH-132469) (GH-133248)
(cherry picked from commit
474f296718eb59391c929eec0e4c3df5fc11fb96 )
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Miss Islington (bot) [Thu, 1 May 2025 11:09:33 +0000 (13:09 +0200)]
[3.13] gh-132246: Add PEP 688 to C Buffer Protocol docs (GH-132249) (#132282)
gh-132246: Add PEP 688 to C Buffer Protocol docs (GH-132249)
(cherry picked from commit
8421b648e91981e393a740dd9fb7b7dbf4cf07dc )
Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Miss Islington (bot) [Thu, 1 May 2025 04:41:44 +0000 (06:41 +0200)]
[3.13] gh-131531: Make Android build retry after network failures (GH-133193) (#133236)
Adds a retry strategy when downloading compilation resources for Android, plus some other cleanups.
(cherry picked from commit
feac343d1aeef9edce91640e4bbc74516980db9a )
Co-authored-by: Malcolm Smith <smith@chaquo.com>
Miss Islington (bot) [Thu, 1 May 2025 02:59:27 +0000 (04:59 +0200)]
[3.13] gh-133183: Include IPHONEOS_DEPLOYMENT_TARGET in iOS shim targets. (GH-133184) (#133234)
Include IPHONEOS_DEPLOYMENT_TARGET in iOS shim targets.
(cherry picked from commit
6e907c4d1f8583a3fc80ad70232981c589900378 )
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Miss Islington (bot) [Wed, 30 Apr 2025 16:58:19 +0000 (18:58 +0200)]
[3.13] Apply 'mod' role to typing module (GH-133201) (#133217)
Apply 'mod' role to typing module (GH-133201)
(cherry picked from commit
2b67db7ce3d73c9ad905125f9a602657afe9be9f )
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Wed, 30 Apr 2025 16:44:00 +0000 (18:44 +0200)]
[3.13] Remove redundant ``--keep-going`` when running Sphinx (GH-133156) (#133214)
Remove redundant ``--keep-going`` when running Sphinx (GH-133156)
(cherry picked from commit
c78216e42c7548f148708fc08cfefbcda9b3ae01 )
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Wed, 30 Apr 2025 14:06:31 +0000 (16:06 +0200)]
[3.13] gh-133167: Fix compilation process with `--enable-optimizations` and `--without-docstrings` (GH-133187) (#133207)
gh-133167: Fix compilation process with `--enable-optimizations` and `--without-docstrings` (GH-133187)
(cherry picked from commit
cc39b19f0fca8db0f881ecaf02f88d72d9f93776 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Wed, 30 Apr 2025 12:57:57 +0000 (14:57 +0200)]
[3.13] gh-133117: Run mypy on `tomllib` in CI (GH-133118) (#133192)
gh-133117: Run mypy on `tomllib` in CI (GH-133118)
(cherry picked from commit
5ea9010e8910cb97555c3aef4ed95cca93a74aab )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Wed, 30 Apr 2025 08:16:59 +0000 (10:16 +0200)]
[3.13] Add `profile-gen-stamp` to `.gitignore` (GH-133188) (#133189)
Add `profile-gen-stamp` to `.gitignore` (GH-133188)
(cherry picked from commit
c4b7f7c7ff91a62cd17ffb0c4cdd25edbc8105b0 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Wed, 30 Apr 2025 07:19:53 +0000 (09:19 +0200)]
[3.13] gh-132308: prevent `TracebackException` swallowing attributes of a falsey `Exception` or `ExceptionGroup` (GH-132363) (#132725)
gh-132308: prevent `TracebackException` swallowing attributes of a falsey `Exception` or `ExceptionGroup` (GH-132363)
(cherry picked from commit
69cda31261dd98b0462dc5ca63bdbcd0954dfa77 )
Co-authored-by: Duprat <yduprat@gmail.com>
Miss Islington (bot) [Tue, 29 Apr 2025 21:59:21 +0000 (23:59 +0200)]
[3.13] gh-133131: Discover an appropriate iOS simulator rather than hard-coding iPhone SE 3rd gen (GH-133132) (#133173)
Determines a candidate simulator at runtime rather than hardcoding iPhone SE.
(cherry picked from commit
42b0b0667e67ff444a03d0e7b217e77f3aae535d )
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Stan Ulbrych [Tue, 29 Apr 2025 16:11:31 +0000 (17:11 +0100)]
[3.13] gh-46236: Document `PyUnicodeIter_Type` (GH-132925) (GH-133149)
gh-46236: Document `PyUnicodeIter_Type` (GH-132925)
(cherry picked from commit
bba14c3e0129dc6c36c304018ab60a5580043f55 )
# Conflicts:
# Doc/c-api/unicode.rst
Miss Islington (bot) [Tue, 29 Apr 2025 11:30:03 +0000 (13:30 +0200)]
[3.13] gh-57281: Fix duplicate deprecation note: array 'u' format (GH-133113) (#133147)
gh-57281: Fix duplicate deprecation note: array 'u' format (GH-133113)
(cherry picked from commit
59ff42155aa976c0b7db6fdb3dff9c68e833bbaa )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Miss Islington (bot) [Tue, 29 Apr 2025 08:48:08 +0000 (10:48 +0200)]
[3.13] Run mypy workflow on `_colorize.py` and `Misc/mypy/**` changes (GH-133116) (#133133)
Run mypy workflow on `_colorize.py` and `Misc/mypy/**` changes (GH-133116)
(cherry picked from commit
01f11a0e4e8ae1132bd36d7f66af7d4dcc387d33 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Mark Shannon [Tue, 29 Apr 2025 08:35:29 +0000 (09:35 +0100)]
[3.13] GH-127682: Backport GH-132351 (GH-132384)
Only call `__iter__` once in generator expressions
Donghee Na [Tue, 29 Apr 2025 05:26:44 +0000 (14:26 +0900)]
[3.13] gh-132070: Use _PyObject_IsUniquelyReferenced in unicodeobject (gh-133039) (gh-133126)
* gh-132070: Use _PyObject_IsUniquelyReferenced in unicodeobject (gh-133039)
---------
(cherry picked from commit
75cbb8d89e7e92ccaba5c615c72459f241dca8b1 )
Co-authored-by: Donghee Na <donghee.na@python.org>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Add _PyObject_IsUniquelyReferenced
---------
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Neil Schemenauer [Tue, 29 Apr 2025 03:33:13 +0000 (20:33 -0700)]
[3.13] gh-133122: Fix for test_type_lookup_mro_reference. (gh-133127)
Change the unit test case to use `getattr()` so that we avoid the
bytecode specializer optimizing the access. The specializer will call
the `__eq__` method before the unit test expects, causing it to fail.
In the 3.14 branch (gh-128164) the test is changed in a different way
to avoid the same issue.
Neil Schemenauer [Mon, 28 Apr 2025 22:08:09 +0000 (15:08 -0700)]
[3.13] gh-132942: Fix races in type lookup cache (gh-133114)
Two races related to the type lookup cache, when used in the
free-threaded build. This caused test_opcache to sometimes fail (as
well as other hard to re-produce failures).
Miss Islington (bot) [Mon, 28 Apr 2025 19:10:42 +0000 (21:10 +0200)]
[3.13] gh-132742: Fix newly added tcflush() tests on Android (GH-133070) (GH-133104)
(cherry picked from commit
25186c2472f6f2ceecb00fcecbce52b924510ed7 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
sobolevn [Mon, 28 Apr 2025 18:00:42 +0000 (21:00 +0300)]
[3.13] gh-133054: Skip `test_pyrepl` tests when `cannot use pyrepl` is reported (GH-133055) (#133095)
(cherry picked from commit
b739ec5ab78ed55367516de7a11e732cb3f1081d )
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Miss Islington (bot) [Mon, 28 Apr 2025 17:15:45 +0000 (19:15 +0200)]
[3.13] gh-132026: Ensure _MIPS_SIM has defined _ABI identifiers for comparison (GH-133092)
When built on a MIPS architecture, `_MIPS_SIM` is used to determine
architecture specifics. The value is expected to match either
`_ABIO32`, `_ABIN32` or `_ABI64`.
In `gcc` config/mips/mips.h these values are defined as compiler
`builtin_define` inside of a switch/case. That means, mips64el and
mips64 architectures know about `_ABI64` but don't know about `_ABIO32`
and `_ABIN32`. In turn, when CPython tries to use them in comparison,
they may be undefined identifiers.
In default compiler behavior, the undefined identifier will be
evaluated as zero, and it will not match `_MIPS_SIM`. However, the
issues pop up when `-Wundef` (or, even worse, `-Werror=undef`) compiler
flag is enabled. Then suddenly it's visible as a warning or error.
(cherry picked from commit
6985e2e6dea67630cf13fc02b7ca727af383207b )
Co-authored-by: Valters Jansons <sigv@users.noreply.github.com>
Miss Islington (bot) [Mon, 28 Apr 2025 15:19:46 +0000 (17:19 +0200)]
[3.13] gh-132726: Change the heading of `sysconfig` CLI section (GH-133035) (#133088)
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Miss Islington (bot) [Mon, 28 Apr 2025 10:55:19 +0000 (12:55 +0200)]
[3.13] gh-133033: Add docs for `TypeIgnore` (GH-133034) (#133078)
gh-133033: Add docs for `TypeIgnore` (GH-133034)
(cherry picked from commit
4e04511cb9c176c32d6f3694f426750d710121cd )
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Serhiy Storchaka [Mon, 28 Apr 2025 08:23:43 +0000 (11:23 +0300)]
[3.13] gh-132742: Improve tests for fcntl.ioctl() (GH-132791) (GH-133066)
* Use better tests for integer argument.
* Add also parallel tests for tcflush() and tcflow().
(cherry picked from commit
ed8e886f4f59df4eceefeb7eef2e3d146967df34 )
Miss Islington (bot) [Sun, 27 Apr 2025 21:59:41 +0000 (23:59 +0200)]
[3.13] gh-133046: Reformat the ``ast`` module docstring (GH-133050) (GH-133060)
gh-133046: Reformat the ``ast`` module docstring (GH-133050)
* Fix formatting in module docstring for `ast` https://github.com/python/cpython/issues/133046
* GH-133046 ast docstring: remove header, dedent, 80-char width.
* Keep existing wrapping
---------
(cherry picked from commit
6d53b752831c453da115dd4ce54a0d121d9990cd )
Co-authored-by: Hunter Hogan <hunterhogan@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Miss Islington (bot) [Sun, 27 Apr 2025 20:54:37 +0000 (22:54 +0200)]
[3.13] [tests] fix test_fcntl issue when run in a ChromeOS linux runtime (GH-133053) (GH-133056)
[tests] fix test_fcntl issue when run in a ChromeOS linux runtime (GH-133053)
* [tests] test_fcntl fails when run in a ChromeOS linux runtime container.
It doesn't appear to support F_NOTIFY? Detect the lack of that and skip the test.
(cherry picked from commit
355ee1a429e68602696d5a4a9966c1448af1c8d1 )
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Sat, 26 Apr 2025 20:28:00 +0000 (22:28 +0200)]
[3.13] gh-63882: Implement some `test_minidom` tests (GH-132879) (#133029)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Julian Gindi <julian@gindi.io>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Sat, 26 Apr 2025 19:46:11 +0000 (21:46 +0200)]
[3.13] gh-133016: Fix a reference to removed `asyncio.futures.TimeoutError` (GH-133019) (#133023)
gh-133016: Fix a reference to removed `asyncio.futures.TimeoutError` (GH-133019)
Just use the builtin `TimeoutError`, and remove the import of `futures`.
(cherry picked from commit
8d6d7386a35b4a6fdd7d599f2184780bb83cc306 )
Co-authored-by: John <john-xyz@outlook.com>
Miss Islington (bot) [Sat, 26 Apr 2025 19:21:22 +0000 (21:21 +0200)]
[3.13] gh-63882: Use `self.assert*` methods in `test_minidom` (GH-133000) (#133024)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Hugo van Kemenade [Sat, 26 Apr 2025 18:47:51 +0000 (21:47 +0300)]
[3.13] doc: update co_flags reference (GH-132300) (#132936)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Victor Stinner [Sat, 26 Apr 2025 12:53:03 +0000 (14:53 +0200)]
[3.13] Revert "[3.13] gh-132921: Fix setuptools._distutils.dep_util deprecation (GH-132923) (#132926)" (#133004)
Revert "[3.13] gh-132921: Fix setuptools._distutils.dep_util deprecation (GH-132923) (#132926)"
This reverts commit
3776ade2e86010d638c538c5d3f225887d714478 .
setuptools.modified module is not available on old setuptools
versions.
Miss Islington (bot) [Sat, 26 Apr 2025 11:02:17 +0000 (13:02 +0200)]
[3.13] gh-91221: fix `test_curses.test_use_default_colors` for xterm-256color (GH-132990) (#132992)
gh-91221: fix `test_curses.test_use_default_colors` for xterm-256color (GH-132990)
Terminals with `xterm-256color` Xterm support may use 15 (bright white) as their default foreground color.
(cherry picked from commit
7f02ded29fb0e7f4ee115b5be32a591ff7b449b8 )
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Fri, 25 Apr 2025 20:30:33 +0000 (22:30 +0200)]
[3.13] gh-132684: [Enum] only call _missing_ in __contains__ for Flags (GH-132790) (GH-132896)
gh-132684: [Enum] only call _missing_ in __contains__ for Flags (GH-132790)
(cherry picked from commit
22bc953aa9be3039629dd1315f856d2522619412 )
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Fri, 25 Apr 2025 14:12:02 +0000 (16:12 +0200)]
[3.13] gh-132527: Added missing `w` typecode to array() error message (GH-132529) (#132938)
Co-authored-by: Christian Veenhuis <124370897+ChVeen@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Miss Islington (bot) [Fri, 25 Apr 2025 13:54:36 +0000 (15:54 +0200)]
[3.13] gh-132912: Set 15 min timeout on GHA Hypothesis CI (GH-132914) (#132937)
gh-132912: Set 15 min timeout on GHA Hypothesis CI (GH-132914)
(cherry picked from commit
eb2e430b88afa93e7bfc05f4346e8336c2c31b48 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Bénédikt Tran [Fri, 25 Apr 2025 12:44:53 +0000 (14:44 +0200)]
[3.13] gh-132909: handle overflow for `'K'` format in `do_mkvalue` (GH-132911) (#132932)
(cherry picked from commit
3fa024dec32e2ff86baf3dd7e14a0b314855327c )
Miss Islington (bot) [Fri, 25 Apr 2025 11:55:22 +0000 (13:55 +0200)]
[3.13] gh-132921: Fix setuptools._distutils.dep_util deprecation (GH-132923) (#132926)
gh-132921: Fix setuptools._distutils.dep_util deprecation (GH-132923)
Replace setuptools._distutils.dep_util with setuptools.modified in
peg_generator compile_c_extension().
(cherry picked from commit
1a70f66ea856de1b1b0ca47baf9ee8ba6799ae18 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Fri, 25 Apr 2025 10:41:40 +0000 (12:41 +0200)]
[3.13] gh-132415: Use shutil.which() in missing_compiler_executable() (GH-132906) (#132916)
gh-132415: Use shutil.which() in missing_compiler_executable() (GH-132906)
Replace deprecated distutils.spawn.find_executable() with
shutil.which() in missing_compiler_executable() of test.support.
(cherry picked from commit
de6482eda3a46cc9c9a03fb9ba57295ab99b4722 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Fri, 25 Apr 2025 08:42:57 +0000 (10:42 +0200)]
[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
9cba14881b371b1e95d57877896169c4605f9b75 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Fri, 25 Apr 2025 02:09:58 +0000 (04:09 +0200)]
[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
b1fc8b69ec4c29026cd8786fc5da0c498c7dcd57 )
Co-authored-by: Ruben Vorderman <r.h.p.vorderman@lumc.nl>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Thu, 24 Apr 2025 22:11:18 +0000 (00:11 +0200)]
[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
15ff60aff0ca28b23c89cb1c0fc8f1f8997ed035 )
Co-authored-by: Brett Cannon <brett@python.org>
Serhiy Storchaka [Thu, 24 Apr 2025 15:47:01 +0000 (18:47 +0300)]
[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.
Miss Islington (bot) [Thu, 24 Apr 2025 14:27:41 +0000 (16:27 +0200)]
[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>
Miss Islington (bot) [Thu, 24 Apr 2025 14:09:03 +0000 (16:09 +0200)]
[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>
Miss Islington (bot) [Thu, 24 Apr 2025 14:03:02 +0000 (16:03 +0200)]
[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>
Miss Islington (bot) [Wed, 23 Apr 2025 21:40:25 +0000 (23:40 +0200)]
[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
862fd890361005598a6f4614ea0608c8447831c2 )
Co-authored-by: John <johnzhou721@gmail.com>
Serhiy Storchaka [Wed, 23 Apr 2025 19:17:51 +0000 (22:17 +0300)]
[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
4b4b9fbb06198f65424ed5be06c59f8b2801b99b )
Miss Islington (bot) [Wed, 23 Apr 2025 18:08:46 +0000 (20:08 +0200)]
[3.13] gh-132742: Update documentation for the fcntl module (GH-132765) (GH-132832)
(cherry picked from commit
5f50541ebd420a2d21a20c6f492e343657e06c1a )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 23 Apr 2025 14:12:03 +0000 (16:12 +0200)]
[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
dc3e9638c22fc1fa807a88c32316ac2558a4b879 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Victor Stinner [Wed, 23 Apr 2025 13:44:33 +0000 (15:44 +0200)]
[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
a4ea80d52394bafffb2257abbe815c7ffdb003a3 )
sobolevn [Tue, 22 Apr 2025 15:57:34 +0000 (18:57 +0300)]
[3.13] Update `pre-commit` repos (GH-132792) (#132804)
(cherry picked from commit
87b1ea016b1454b1e83b9113fa9435849b7743aa )
Miss Islington (bot) [Mon, 21 Apr 2025 22:42:55 +0000 (00:42 +0200)]
[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
ea8ec95cfadbf58a11ef8e41341254d982a1a479 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Gregory P. Smith [Mon, 21 Apr 2025 21:55:57 +0000 (14:55 -0700)]
[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
2b47f46d7dc30d27b2486991fea4acd83553294b )
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
Peter Bierma [Mon, 21 Apr 2025 21:38:51 +0000 (17:38 -0400)]
[3.13] gh-132747: Fix `NULL` dereference when calling a method's `__get__` manually (GH-132772) (#132786)
(cherry picked from commit
fa70bf85931eff62cb24fb2f5b7e86c1dcf642d0 )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Miss Islington (bot) [Mon, 21 Apr 2025 07:55:13 +0000 (09:55 +0200)]
[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
fee808936fd04e850a62c9610498bbb2360efd31 )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Serhiy Storchaka [Mon, 21 Apr 2025 07:10:31 +0000 (10:10 +0300)]
[3.13] gh-132753: Argument Clinic: Fix support of c_default for the bool converter (GH-132754) (GH-132766)
(cherry picked from commit
78cfee6f0920ac914ed179c013f61c53ede16fa9 )
Miss Islington (bot) [Mon, 21 Apr 2025 06:49:45 +0000 (08:49 +0200)]
[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
a04390b4dad071195f834db347aa686292811051 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sun, 20 Apr 2025 17:48:16 +0000 (19:48 +0200)]
[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
492e3e6976d05b8de1892c37c900ada23eaeaf06 )
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Sun, 20 Apr 2025 01:12:26 +0000 (03:12 +0200)]
[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
a16586c9e7a9accfe26489191b5b1ee39657ee5b )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Eli Schwartz <eschwartz@gentoo.org>
Peter Bierma [Sat, 19 Apr 2025 14:29:05 +0000 (10:29 -0400)]
[3.13] gh-132673: Fix a crash with zero-alignment in `ctypes.Structure` (#132695)
Miss Islington (bot) [Sat, 19 Apr 2025 14:20:46 +0000 (16:20 +0200)]
[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
e154e4db3684696d29725112f0fcc69e05c40cd1 )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Miss Islington (bot) [Fri, 18 Apr 2025 20:49:23 +0000 (22:49 +0200)]
[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
ce31ae5209c976d28d1c21fcbb06c0ae5e50a896 )
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>
Miss Islington (bot) [Fri, 18 Apr 2025 19:35:35 +0000 (21:35 +0200)]
[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
1d5dc5f1c37ce28a635386189020cf49b3f7f1c3 )
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>
Miss Islington (bot) [Fri, 18 Apr 2025 17:47:25 +0000 (19:47 +0200)]
[3.13] Minor doc edit: Make multinomial() the first math example (gh-132697) (gh-132698)
Łukasz Langa [Fri, 18 Apr 2025 15:41:42 +0000 (17:41 +0200)]
[3.13] gh-129958: Properly disallow newlines in format specs in single-quoted f-strings (GH-130063) (GH-132692)
(cherry picked from commit
2f8b08da475152adea59b6bf98e2d0cb73dd8a59 )
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Miss Islington (bot) [Fri, 18 Apr 2025 13:48:23 +0000 (15:48 +0200)]
[3.13] gh-130861: Add clarification to the perf docs on optimization levels (GH-131098) (#132687)
Miss Islington (bot) [Fri, 18 Apr 2025 12:51:02 +0000 (14:51 +0200)]
[3.13] gh-132553: Build the perf tool without buildid cache (GH-132663) (GH-132681)
(cherry picked from commit
e01e5829020e517eb68a47da4dd65926a9d144de )
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Miss Islington (bot) [Fri, 18 Apr 2025 12:17:36 +0000 (14:17 +0200)]
[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
2df0f8804701cc17674e5b4e90499e9fac71d0e1 )
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Fri, 18 Apr 2025 12:14:40 +0000 (14:14 +0200)]
[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
7e2672cfcf993e957c9966a88931fe6571affd24 )
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Miss Islington (bot) [Fri, 18 Apr 2025 04:02:18 +0000 (06:02 +0200)]
[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
1d529cbc892b824b387d672899265ed4258b2222 )
Co-authored-by: Ee Durbin <ewdurbin@gmail.com>
Miss Islington (bot) [Thu, 17 Apr 2025 19:37:30 +0000 (21:37 +0200)]
gh-132649: Allow passing --include-tcltk to PC\layout on Windows ARM64 (GH-132650)
(cherry picked from commit
b87189deae7cdd65083da60cf3ba6e5bba117663 )
Co-authored-by: Steve Dower <steve.dower@python.org>
Bartosz Sławecki [Thu, 17 Apr 2025 09:21:56 +0000 (11:21 +0200)]
[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
954b2cf031fb84ff3386251d5c45281f47229003 )
Miss Islington (bot) [Wed, 16 Apr 2025 20:02:39 +0000 (22:02 +0200)]
[3.13] gh-132608: Fix a sample code coloring for ast.While (GH-132609) (#132612)
Miss Islington (bot) [Wed, 16 Apr 2025 17:50:31 +0000 (19:50 +0200)]
[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>
Miss Islington (bot) [Wed, 16 Apr 2025 15:45:29 +0000 (17:45 +0200)]
[3.13] typing: Add missing test case for Protocol inheritance (GH-132597) (#132603)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Miss Islington (bot) [Wed, 16 Apr 2025 14:21:58 +0000 (16:21 +0200)]
[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
014c7f90478780b18d0e33d456483178c8dcc665 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Wed, 16 Apr 2025 12:19:46 +0000 (14:19 +0200)]
[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
c35c7353eb8fbccff2d3a6ab664426b31af00d4d )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Wed, 16 Apr 2025 11:06:53 +0000 (13:06 +0200)]
[3.13] gh-127591: Fix altering environment in test_urllib2 (unsetting no_proxy) (GH-132584) (GH-132585)
(cherry picked from commit
8b7cb947c5046d8fb32aad532048de87e09ed3f9 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 16 Apr 2025 07:44:47 +0000 (09:44 +0200)]
[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
82f74eb2344cdb3197c726d1216e413ee61a30b3 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Tue, 15 Apr 2025 22:42:27 +0000 (00:42 +0200)]
[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
4f10b93d1b2f887b42ad59168a9fcbe75bdaaf87 )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Tue, 15 Apr 2025 19:05:28 +0000 (21:05 +0200)]
[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
884df116d79b05d9342e05e50484d61c684ecb8b )
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>
Miss Islington (bot) [Tue, 15 Apr 2025 16:56:57 +0000 (18:56 +0200)]
[3.13] Fix argument order in multinomial() example (gh-132557) (gh-132560)
Miss Islington (bot) [Tue, 15 Apr 2025 11:38:20 +0000 (13:38 +0200)]
[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
b6c552f9e614bab4acf21584baed997f57e74114 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
Serhiy Storchaka [Mon, 14 Apr 2025 18:59:07 +0000 (21:59 +0300)]
[3.13] gh-124476: Fix decoding from the locale encoding in the C.UTF-8 locale (GH-132477) (ПР-132528)
(cherry picked from commit
102f825c5112cbe6985edc0971822b07bd778135 )
Miss Islington (bot) [Mon, 14 Apr 2025 16:52:36 +0000 (18:52 +0200)]
[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
939476bbbb57ec3348c60df7c8f67c92038c8c89 )
Co-authored-by: Jeremy Fleischman <jeremyfleischman@gmail.com>
Victor Stinner [Mon, 14 Apr 2025 16:48:40 +0000 (18:48 +0200)]
[3.13] gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040) (#132521)
gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040)
(cherry picked from commit
8768df2fe94a8444baff47a5b8c7414a2118731a )
Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
Serhiy Storchaka [Mon, 14 Apr 2025 16:36:04 +0000 (19:36 +0300)]
[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
1fc1df8dcc7a853b0649bc8df37cd07cbd2b6230 )
Miss Islington (bot) [Mon, 14 Apr 2025 15:29:20 +0000 (17:29 +0200)]
[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
45c447bf91ffabe4c0ba6d18f37d4e58925d5c91 )
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Mon, 14 Apr 2025 11:42:45 +0000 (13:42 +0200)]
[3.13] gh-86513: improve docs of loop.call_exception_handler (GH-132466) (#132487)
gh-86513: improve docs of loop.call_exception_handler (GH-132466)
(cherry picked from commit
ce753517a87eec776c176f3245ce5d1554a59341 )
Co-authored-by: Kumar Aditya <kumaraditya@python.org>