Commit graph

124257 commits

Author SHA1 Message Date
Miss Islington (bot)
bb0a8575a7
gh-91156: Document how TextIOWrapper interacts with UTF-8 mode (GH-132885)
Document how TextIOWrapper interacts with UTF-8 mode
(cherry picked from commit 245cd6c532)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
2025-05-03 11:38:35 +09:00
Miss Islington (bot)
8a05dbe004
[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 a512905e15)

Co-authored-by: Paul Moore <p.f.moore@gmail.com>
2025-05-02 18:26:38 +01:00
Miss Islington (bot)
e2ad2c8042
[3.13] gh-112936: Fix IDLE: no Shell menu item in single-process mode (GH-126598) (GH-133310)
(cherry picked from commit 7e7e49be78)

Co-authored-by: Zhikang Yan <2951256653@qq.com>
2025-05-02 17:26:26 +00:00
Miss Islington (bot)
e75f528e78
[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 2590774c9b)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-05-02 18:10:32 +02:00
Miss Islington (bot)
16e9e74a8b
[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 641253cfac)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-02 13:27:54 +00:00
Miss Islington (bot)
6a919d0488
[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 ba16ba3a18)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-02 13:27:30 +00:00
Miss Islington (bot)
b225ce7744
[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>
2025-05-02 13:24:12 +01:00
Miss Islington (bot)
b64cc74b14
[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 4912b29166)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-02 10:36:35 +00:00
Tomas R.
ae775dcc24
[3.13] gh-130197: Improve test coverage of msgfmt.py (GH-133048) (GH-133255)
(cherry picked from commit c73d46076e)
2025-05-02 07:28:28 +00:00
Miss Islington (bot)
766c5f75b9
[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 b8633f9aca)

Co-authored-by: Xuehai Pan <XuehaiPan@pku.edu.cn>
2025-05-01 20:06:07 -07:00
Miss Islington (bot)
f7d1109a12
[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 27e011455d)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-01 16:36:12 +00:00
Miss Islington (bot)
90c786e377
[3.13] gh-130655: Add a test for big-endian MO files in gettext (GH-132469) (GH-133248)
(cherry picked from commit 474f296718)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-05-01 11:36:06 +00:00
Miss Islington (bot)
679e632c5e
[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 8421b648e9)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-05-01 12:09:33 +01:00
Miss Islington (bot)
bf8eecdca7
[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 feac343d1a)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
2025-05-01 04:41:44 +00:00
Miss Islington (bot)
f68be0f38e
[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 6e907c4d1f)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2025-05-01 02:59:27 +00:00
Miss Islington (bot)
4f006ffdb9
[3.13] Apply 'mod' role to typing module (GH-133201) (#133217)
Apply 'mod' role to typing module (GH-133201)
(cherry picked from commit 2b67db7ce3)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-04-30 16:58:19 +00:00
Miss Islington (bot)
110bec88bf
[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 c78216e42c)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-04-30 17:44:00 +01:00
Miss Islington (bot)
704a3f8c0a
[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 cc39b19f0f)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-04-30 14:06:31 +00:00
Miss Islington (bot)
0458554482
[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 5ea9010e89)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-04-30 12:57:57 +00:00
Miss Islington (bot)
13f5a9a0f3
[3.13] Add profile-gen-stamp to .gitignore (GH-133188) (#133189)
Add `profile-gen-stamp` to `.gitignore` (GH-133188)
(cherry picked from commit c4b7f7c7ff)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-04-30 08:16:59 +00:00
Miss Islington (bot)
dfaa384991
[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 69cda31261)

Co-authored-by: Duprat <yduprat@gmail.com>
2025-04-30 09:19:53 +02:00
Miss Islington (bot)
7998f998b2
[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 42b0b0667e)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2025-04-29 21:59:21 +00:00
Stan Ulbrych
ff4134603a
[3.13] gh-46236: Document PyUnicodeIter_Type (GH-132925) (GH-133149)
gh-46236: Document `PyUnicodeIter_Type` (GH-132925)

(cherry picked from commit bba14c3e01)

# Conflicts:
#	Doc/c-api/unicode.rst
2025-04-29 18:11:31 +02:00
Miss Islington (bot)
dcbda412a1
[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 59ff42155a)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-04-29 11:30:03 +00:00
Miss Islington (bot)
0b1e676f70
[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 01f11a0e4e)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-04-29 08:48:08 +00:00
Mark Shannon
132bdf6990
[3.13] GH-127682: Backport GH-132351 (GH-132384)
Only call `__iter__` once in generator expressions
2025-04-29 09:35:29 +01:00
Donghee Na
7ffef8d07b
[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 75cbb8d89e)

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>
2025-04-29 14:26:44 +09:00
Neil Schemenauer
64dcbb0c31
[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.
2025-04-29 03:33:13 +00:00
Neil Schemenauer
ca46ec85f8
[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).
2025-04-28 22:08:09 +00:00
Miss Islington (bot)
b71442f44f
[3.13] gh-132742: Fix newly added tcflush() tests on Android (GH-133070) (GH-133104)
(cherry picked from commit 25186c2472)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-04-28 19:10:42 +00:00
sobolevn
ab89f6ec84
[3.13] gh-133054: Skip test_pyrepl tests when cannot use pyrepl is reported (GH-133055) (#133095)
(cherry picked from commit b739ec5ab7)

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
2025-04-28 18:00:42 +00:00
Miss Islington (bot)
507b4fa7a4
[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 6985e2e6de)

Co-authored-by: Valters Jansons <sigv@users.noreply.github.com>
2025-04-28 12:15:45 -05:00
Miss Islington (bot)
85882ca0e7
[3.13] gh-132726: Change the heading of sysconfig CLI section (GH-133035) (#133088)
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
2025-04-28 15:19:46 +00:00
Miss Islington (bot)
6ade0c3b2b
[3.13] gh-133033: Add docs for TypeIgnore (GH-133034) (#133078)
gh-133033: Add docs for `TypeIgnore` (GH-133034)
(cherry picked from commit 4e04511cb9)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-04-28 10:55:19 +00:00
Serhiy Storchaka
0d53872443
[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 ed8e886f4f)
2025-04-28 08:23:43 +00:00
Miss Islington (bot)
154225bb33
[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 6d53b75283)

Co-authored-by: Hunter Hogan <hunterhogan@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-04-27 21:59:41 +00:00
Miss Islington (bot)
8fdc10686b
[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 355ee1a429)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-04-27 20:54:37 +00:00
Miss Islington (bot)
fdcaaad1cc
[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>
2025-04-26 20:28:00 +00:00
Miss Islington (bot)
3a1a2a0b49
[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 8d6d7386a3)

Co-authored-by: John <john-xyz@outlook.com>
2025-04-26 19:46:11 +00:00
Miss Islington (bot)
4031902949
[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>
2025-04-26 19:21:22 +00:00
Hugo van Kemenade
2c9842f7ac
[3.13] doc: update co_flags reference (GH-132300) (#132936)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2025-04-26 21:47:51 +03:00
Victor Stinner
994529da92
[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 3776ade2e8.

setuptools.modified module is not available on old setuptools
versions.
2025-04-26 12:53:03 +00:00
Miss Islington (bot)
41e19a78b2
[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 7f02ded29f)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-26 11:02:17 +00:00
Miss Islington (bot)
08772229c7
[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 22bc953aa9)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-25 13:30:33 -07:00
Miss Islington (bot)
3ff35ba471
[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>
2025-04-25 17:12:02 +03:00
Miss Islington (bot)
76840557bc
[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 eb2e430b88)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-04-25 13:54:36 +00:00
Bénédikt Tran
7ebfc6ec5e
[3.13] gh-132909: handle overflow for 'K' format in do_mkvalue (GH-132911) (#132932)
(cherry picked from commit 3fa024dec3)
2025-04-25 12:44:53 +00:00
Miss Islington (bot)
3776ade2e8
[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 1a70f66ea8)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-04-25 11:55:22 +00:00
Miss Islington (bot)
b4a160ac59
[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 de6482eda3)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-04-25 10:41:40 +00:00
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