Commit graph

123841 commits

Author SHA1 Message Date
Miss Islington (bot)
f8b24cdbb9
[3.13] gh-125674: Doc: Fix type of newfunc first parameter (GH-125675) (#128449)
(cherry picked from commit 616468b87b)

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-01-03 14:12:24 +00:00
Miss Islington (bot)
e0f0d2d2b8
[3.13] gh-108202: Document calendar.TextCalendar formatting helpers (GH-127608) (#128440)
Document the following TextCalendar methods:
- formatday()
- formatmonthname()
- formatweekday()
- formatweekheader()

(cherry picked from commit bb73426caf)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-01-03 10:03:45 +00:00
Miss Islington (bot)
ebadfd1039
[3.13] gh-128400: Stop-the-world when manually calling faulthandler (GH-128422) (GH-128423)
(cherry picked from commit c9356feef2)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-01-02 19:21:16 +00:00
Kumar Aditya
fa6c48e4b3
[3.13] gh-128013: fix data race in PyUnicode_AsUTF8AndSize on free-threading (#128021) (#128417) 2025-01-02 22:10:17 +05:30
Miss Islington (bot)
24cddab4a2
[3.13] gh-128014: Fix passing default='' to the tkinter method wm_iconbitmap() (GH-128015) (GH-128418)
(cherry picked from commit 58e9f95c4a)

Co-authored-by: Zhikang Yan <2951256653@qq.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-01-02 16:14:18 +00:00
Miss Islington (bot)
cc5b03f89d
[3.13] Revert "Doc: Show object descriptions in the table of contents (GH-125757)" (GH-128406) (#128413)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-01-02 14:40:19 +00:00
Miss Islington (bot)
261a604a88
[3.13] gh-123925: Fix building curses on platforms without libncursesw (GH-128405) (GH-128407)
(cherry picked from commit 8d16919a06)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-01-02 12:01:40 +00:00
Miss Islington (bot)
48d50fd491
[3.13] gh-128349: Use .. data:: instead of .. class:: for pre-defined decimal Context objects (GH-128379) (#128401)
gh-128349: Use `.. data::` instead of `.. class::` for pre-defined decimal `Context` objects (GH-128379)
(cherry picked from commit 60c6518469)

Co-authored-by: abkmystery <36216019+abkmystery@users.noreply.github.com>
2025-01-02 07:28:12 +00:00
Miss Islington (bot)
675b039e46
[3.13] Reword about.rst to not limit Sphinx (GH-128325) (#128382)
Reword `about.rst` to not limit Sphinx (GH-128325)
(cherry picked from commit c5438fdf47)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-12-31 21:28:59 +00:00
Miss Islington (bot)
08ae06fe46
[3.13] gh-88834: Unify the instance check for typing.Union and types.UnionType (GH-128363) (GH-128370)
Union now uses the instance checks against its parameters instead of
the subclass checks.
(cherry picked from commit b2ac70a62a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-12-31 18:45:03 +00:00
Miss Islington (bot)
62729d7920
[3.13] gh-128342: Specify timeout unit in subprocess docstrings (GH-128343) (#128365)
gh-128342: Specify timeout unit in subprocess docstrings (GH-128343)

Specify timeout unit (seconds) in subprocess docstrings
(cherry picked from commit dafe7a4463)

Co-authored-by: n-l-i <57808975+n-l-i@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-12-30 21:15:44 +00:00
Miss Islington (bot)
5a892cbd46
[3.13] gh-128321: Set LIBS instead of LDFLAGS when checking sqlite3 requirements (GH-128322) (#128356)
(cherry picked from commit 81376fef76)

Co-authored-by: Zanie Blue <contact@zanie.dev>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-12-30 17:48:32 +00:00
Miss Islington (bot)
207a81ac19
[3.13] gh-128317: Document calendar.TextCalendar.formatweek (GH-128353) (#128357)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-12-30 19:40:29 +02:00
Miss Islington (bot)
16fde763e5
[3.13] gh-127586: multiprocessing.Pool does not properly restore blocked signals (try 2) (GH-128011) (#128298)
gh-127586: multiprocessing.Pool does not properly restore blocked signals (try 2) (GH-128011)

Correct pthread_sigmask in resource_tracker to restore old signals

Using SIG_UNBLOCK to remove blocked "ignored signals" may accidentally
cause side effects if the calling parent already had said signals
blocked to begin with and did not intend to unblock them when
creating a pool. Use SIG_SETMASK instead with the previous mask of
blocked signals to restore the original blocked set.
(cherry picked from commit aeb9b65aa2)

Co-authored-by: Stephen Hansen <stephen.paul.hansen@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-12-29 11:02:53 -08:00
Miss Islington (bot)
aea2e03b27
[3.13] Mention loop_factory argument in docstring for asyncio.run() (GH-128288) (#128291)
Mention loop_factory argument in docstring for asyncio.run() (GH-128288)
(cherry picked from commit 0b5f1fae57)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2024-12-27 14:22:25 +00:00
Miss Islington (bot)
bad6b7bfca
[3.13] gh-125887: Update PyObject_HasAttr exception behavior (GH-125907) (#128283)
gh-125887: Update PyObject_HasAttr exception behavior (GH-125907)

Update PyObject_HasAttr exception behavior

(cherry picked from commit 08a0728d6c)

Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-12-27 02:03:38 +00:00
Miss Islington (bot)
1781525422
[3.13] gh-127537: Add __class_getitem__ to the python implementation of functools.partial (GH-127537) (#128281)
gh-127537: Add __class_getitem__ to the python implementation of functools.partial (GH-127537)
(cherry picked from commit 401bba6b58)

Co-authored-by: CF Bolz-Tereick <cfbolz@gmx.de>
2024-12-27 01:25:56 +00:00
Miss Islington (bot)
4f59f1d0d3
[3.13] Clean up redundant ifdef in list getitem (GH-128257) (#128276)
Clean up redundant ifdef in list getitem (GH-128257)

It's already inside a `Py_GIL_DISABLED` block so the `#else` clause is always unused.
(cherry picked from commit 42f7a00ae8)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2024-12-26 15:04:32 +00:00
Serhiy Storchaka
c30cad0638
[3.13] gh-128198: Add missing error checks for usages of PyIter_Next() (GH-128199) (GH-128272)
(cherry picked from commit 5c814c83cd)

Co-authored-by: Yan Yanchii <yyanchiy@gmail.com>
2024-12-26 10:39:47 +00:00
Miss Islington (bot)
32adae1a10
[3.13] gh-126664: revert: Use else instead of finally in docs explaining "with" (GH-128169) (#128170)
gh-126664: revert: Use `else` instead of `finally` in docs explaining "with" (GH-128169)

Revert "gh-126664: Use `else` instead of `finally` in "The with statement" documentation. (GH-126665)"

This reverts commit 25257d61cf.
(cherry picked from commit 228f275737)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-12-24 10:55:57 -08:00
Ethan Furman
875e49fb63
[3.13] gh-112328: Make EnumDict usable on its own and document it (GH-123669) (GH-128142)
Co-authored-by: Petr Viktorin <pviktori@redhat.com>
2024-12-24 10:50:23 -08:00
Miss Islington (bot)
a52d663d0c
[3.13] gh-128227: Regenerate Doc/requirements-oldest-sphinx.txt (GH-128228) (#128229)
gh-128227: Regenerate `Doc/requirements-oldest-sphinx.txt` (GH-128228)
(cherry picked from commit 7985d460c7)

Co-authored-by: Bogdan Romanyuk <65823030+wrongnull@users.noreply.github.com>
2024-12-24 18:06:12 +00:00
Miss Islington (bot)
e1a0c40658
[3.13] gh-127847: Fix position in the special-cased zipfile seek (GH-127856) (#128225)
gh-127847: Fix position in the special-cased zipfile seek (GH-127856)

---------
(cherry picked from commit 7ed6c5c696)

Co-authored-by: Dima Ryazanov <dima@bucket.xxx>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2024-12-24 16:20:58 +00:00
Miss Islington (bot)
40c46f08e2
gh-128217: Validate the normalized_environment variable instead of the similarly named function (GH-128220)
(cherry picked from commit 3ddd70ceaa)

Co-authored-by: Sergey Muraviov <smurav@mail.ru>
2024-12-24 13:29:56 +00:00
Miss Islington (bot)
6f3c2c8d04
[3.13] gh-126180: Remove getopt and optparse deprecation notices (GH-128191)
* Remove getopt and optparse deprecation notices
* Add new docs sections for command line app helper libraries
* Add guidance on choosing a CLI parsing library to the optparse docs
* Link to the new guidance from the argparse and getopt docs
* Reword intro in docs section for superseded stdlib modules
* Reframe the optparse->argparse guide as a migration guide
  rather than as an upgrade guide

---------
(cherry picked from commit 831b6de6d7)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-12-23 04:40:59 +00:00
Miss Islington (bot)
09d15aa9a8
[3.13] gh-128049: Fix type confusion bug with the return value of a custom ExceptionGroup split function (GH-128079) (#128139)
gh-128049: Fix type confusion bug with the return value of a custom ExceptionGroup split function (GH-128079)
(cherry picked from commit 3879ca0100)

Co-authored-by: Nico-Posada <102486290+Nico-Posada@users.noreply.github.com>
2024-12-20 20:18:44 +00:00
Miss Islington (bot)
43586a4804
[3.13] gh-128116: Skip test_socket VSOCK testStream() on PermissionError (GH-128120) (#128123)
gh-128116: Skip test_socket VSOCK testStream() on PermissionError (GH-128120)
(cherry picked from commit cbfe3023e4)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-12-20 13:32:58 +00:00
Miss Islington (bot)
f320f747da
[3.13] gh-128030: Avoid error from PyModule_GetFilenameObject for non-module (GH-128047) (#128114)
gh-128030: Avoid error from PyModule_GetFilenameObject for non-module (GH-128047)

I missed the extra `PyModule_Check` in GH-127660 because I was looking at
3.12 as the base implementation for import from. This meant that I
missed the `PyModuleCheck` introduced in GH-112661.
(cherry picked from commit 45e6dd63b8)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-12-20 08:46:54 +00:00
Peter Bierma
3a8bdaf698
[3.13] gh-128083: Fix macro redefinition warning in clinic. (GH-127950) (#128102)
(cherry picked from commit b5d1e4552f)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2024-12-19 21:29:14 +00:00
Miss Islington (bot)
a0f1f120f2
[3.13] gh-128062: Fix the font size and shortcut display of the turtledemo menu (GH-128063) (#128101)
gh-128062: Fix the font size and shortcut display of the turtledemo menu (GH-128063)

Leave the font of the menu bar the default to keep it consistent with the rest of the world. Display the shortcut keys in the right way, using the 'accelerator' option.
---------

(cherry picked from commit e163e8d4e1)

Co-authored-by: Zhikang Yan <2951256653@qq.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-12-19 20:47:24 +00:00
Miss Islington (bot)
08f9b7cb2a
[3.13] gh-128069: brew link --overwrite tcl-tk@8 to prevent conflict with GitHub image's version (GH-128090) (#128096)
gh-128069: brew link --overwrite tcl-tk@8 to prevent conflict with GitHub image's version (GH-128090)

brew link --overwrite tcl-tk@8 to prevent conflict with GitHub image's version
(cherry picked from commit 46dc1ba9c6)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-12-19 15:20:07 +00:00
Miss Islington (bot)
d699ce3961
[3.13] gh-126742: add NEWS entry for fix of localized error messages (GH-128025) (GH-128059)
(cherry picked from commit 2610bccfdf)
2024-12-19 14:52:32 +01:00
Miss Islington (bot)
f8e7b5cc8d
[3.13] gh-122706: fix docs for asyncio ssl sockets (GH-128092) (#128094)
gh-122706: fix docs for asyncio ssl sockets (GH-128092)
(cherry picked from commit 19c5134d57)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2024-12-19 18:26:05 +05:30
Miss Islington (bot)
2ff3e95ad5
[3.13] gh-126742: Avoid checking for library filename in test_ctypes (GH-128034) (#128056)
gh-126742: Avoid checking for library filename in test_ctypes (GH-128034)

Avoid checking for library filename in `dlerror()` error messages of test_ctypes.
(cherry picked from commit 335e24fb0a)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-12-18 08:49:13 +00:00
Miss Islington (bot)
f8b4e20137
[3.13] gh-127060: Disable traceback colors in IDLE (GH-128028) (#128052)
Set TERM environment variable to "dumb" to disable traceback colors
in IDLE, since IDLE doesn't understand ANSI escape sequences.

(cherry picked from commit 559b0e7013)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-12-18 05:58:57 +00:00
Miss Islington (bot)
fe08cdf265
[3.13] gh-126742: Add _PyErr_SetLocaleString, use it for gdbm & dlerror messages (GH-126746) (GH-128023)
- Add a helper to set an error from locale-encoded `char*`
- Use the helper for gdbm & dlerror messages
(cherry picked from commit 7303f06846)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2024-12-17 11:45:29 +00:00
Miss Islington (bot)
367ea89384
[3.13] Free arena on _PyCompile_AstOptimize failure in Py_CompileStringObject (GH-128006)
Free arena on _PyCompile_AstOptimize failure in Py_CompileStringObject (GH-127910)

After commit 10a91d7e9 introduced arena cleanup, commit 2dfbd4f36
removed the free call when _PyCompile_AstOptimize fails.

(cherry picked from commit cfeaa992ba)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2024-12-16 23:26:39 +02:00
Miss Islington (bot)
71a1e79134
[3.13] Minor readability improvements for the itertools recipes (gh-127928) (gh-127999) 2024-12-16 17:33:20 +00:00
Miss Islington (bot)
28e684b330
[3.13] Simplify and speed-up an itertools recipe (gh-127848) (gh-127998) 2024-12-16 11:26:58 -06:00
Miss Islington (bot)
231c93923d
[3.13] Fix typo in itertools docs (gh-127995) (gh-127996) 2024-12-16 11:20:14 -06:00
Victor Stinner
8e143b2886
[3.13] gh-127906: Fix Py_BUILD_ASSERT_EXPR() on Windows (#127994)
gh-127906: Fix Py_BUILD_ASSERT_EXPR() on Windows

Change Py_BUILD_ASSERT_EXPR implementation on Windows to avoid a
compiler warning about an unnamed structure.
2024-12-16 17:17:01 +00:00
Miss Islington (bot)
89f4b23f9e
[3.13] Clarify ast docs to use a less confusing example for ast.ParamSpec (GH-127955) (#127959)
Clarify ast docs to use a less confusing example for `ast.ParamSpec` (GH-127955)

Fix typo in ast docs: ParamSpec defaults
(cherry picked from commit 7900a85019)

Co-authored-by: Steve C <diceroll123@gmail.com>
2024-12-15 12:35:25 +00:00
Miss Islington (bot)
90ae4b6f5a
[3.13] gh-127353: Allow to force color output on Windows V2 (GH-127926) (#127944)
gh-127353: Allow to force color output on Windows V2 (GH-127926)
(cherry picked from commit 0ac40acec0)

Co-authored-by: Andrey Efremov <duxus@yandex.ru>
2024-12-15 10:41:11 +02:00
Miss Islington (bot)
9c6bd272b4
[3.13] gh-127852: add remark about ',' separator (GH-127854) (#127941)
Specify that it is valid for floats and ints with 'd' presentation and an error otherwise.
---------

(cherry picked from commit e2325c9db0)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-12-14 13:34:18 +00:00
Victor Stinner
2996a2bed3
[3.13] gh-127906: Backport test_cext changes from the main branch (#127923) 2024-12-13 15:04:08 +00:00
Miss Islington (bot)
78095c9052
[3.13] gh-127906: Test the limited C API in test_cppext (GH-127916) (#127919)
gh-127906: Test the limited C API in test_cppext (GH-127916)
(cherry picked from commit d05a4e6a0d)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-12-13 14:12:07 +00:00
Miss Islington (bot)
0f38b897f9
[3.13] gh-127870: Detect recursive calls in ctypes _as_parameter_ handling (GH-127872) (#127917)
gh-127870: Detect recursive calls in ctypes _as_parameter_ handling (GH-127872)
(cherry picked from commit 6ff38fc4e2)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-12-13 13:19:41 +00:00
Victor Stinner
b620e503eb
[3.13] gh-127906: Backport test_cppext changes from the main branch (#127914) 2024-12-13 12:51:48 +00:00
Miss Islington (bot)
8384279863
[3.13] link to the correct output method in documentation (GH-127857) (#127900)
link to the correct output method in documentation (GH-127857)
(cherry picked from commit 11ff3286b7)

Co-authored-by: Viktor Kálmán <kviktor@users.noreply.github.com>
2024-12-13 15:07:46 +05:30
Miss Islington (bot)
6023b3b01e
[3.13] Document PyObject_SelfIter (GH-127861) (#127898)
Document PyObject_SelfIter (GH-127861)
(cherry picked from commit 58942a07df)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2024-12-13 15:07:28 +05:30