Commit graph

123667 commits

Author SHA1 Message Date
Miss Islington (bot)
dda55ccf1a
[3.13] gh-41872: Fix quick extraction of module docstrings from a file in pydoc (GH-127520) (GH-128620)
It now supports docstrings with single quotes, escape sequences,
raw string literals, and other Python syntax.

(cherry picked from commit 474e419792)

Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్  రెడ్డి) <thatiparthysreenivas@gmail.com>
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-01-08 14:21:15 +02:00
Miss Islington (bot)
c0ba0bc547
[3.13] gh-128617: Fix test_typing.test_readonly_inheritance (GH-128618) (#128622)
gh-128617: Fix `test_typing.test_readonly_inheritance` (GH-128618)
(cherry picked from commit 971a52b549)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-01-08 11:43:16 +00:00
Miss Islington (bot)
32012ed3bc
[3.13] gh-109413: Add more type hints to libregrtest (GH-126352) (#126388)
gh-109413: Add more type hints to `libregrtest` (GH-126352)
(cherry picked from commit bfc1d2504c)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-01-08 09:00:46 +00:00
Miss Islington (bot)
0cd603689a
[3.13] gh-87506: Document that json.load*() can raise UnicodeDecodeError (GH-127355) (#128607)
(cherry picked from commit 15372d0112)
(cherry picked from commit cdfb8bc93a)

Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్  రెడ్డి) <thatiparthysreenivas@gmail.com>
Co-authored-by: Erlend Aasland <erlend@python.org>
2025-01-08 08:48:55 +00:00
Miss Islington (bot)
984cdb788e
[3.13] Docs: mark up json.load() using parameter list (GH-128488) (#128596)
(cherry picked from commit a21e31ec54)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2025-01-07 21:13:25 +00:00
Miss Islington (bot)
ad3bbb6b0d
[3.13] gh-98188: Fix EmailMessage.get_payload to decode data when CTE value has extra text (GH-127547) (#128528)
gh-98188: Fix EmailMessage.get_payload to decode data when CTE value has extra text (GH-127547)

Up to this point message handling has been very strict with regards to content encoding values: mixed case was accepted, but trailing blanks or other text would cause decoding failure, even if the first token was a valid encoding.  By Postel's Rule we should go ahead and decode as long as we can recognize that first token.  We have not thought of any security or backward compatibility concerns with this fix.

This fix does introduce a new technique/pattern to the Message code: we look to see if the header has a 'cte' attribute, and if so we use that.  This effectively promotes the header API exposed by HeaderRegistry to an API that any header parser "should" support.  This seems like a reasonable thing to do.  It is not, however, a requirement, as the string value of the header is still used if there is no cte attribute.

The full fix (ignore any trailing blanks or blank-separated trailing text) applies only to the non-compat32 API.  compat32 is only fixed to the extent that it now ignores trailing spaces.  Note that the HeaderRegistry parsing still records a HeaderDefect if there is extra text.

(cherry picked from commit a62ba52f14)

Co-authored-by: RanKKI <hliu86.me@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-01-07 12:43:04 -05:00
Miss Islington (bot)
692a955cea
[3.13] gh-128472: Add -skip-funcs to BOLT options to fix computed goto errors (gh-128511) (#128573)
gh-128472: Add `-skip-funcs` to BOLT options to fix computed goto errors (gh-128511)

* Add `-skip-funcs` to BOLT options to fix computed goto errors



* NEWS

---------

(cherry picked from commit 24b147a19b)

Co-authored-by: Zanie Blue <contact@zanie.dev>
Co-authored-by: Gregory Szorc <gregory.szorc@gmail.com>
2025-01-08 01:59:20 +09:00
Miss Islington (bot)
8f3e5554ba
[3.13] gh-108202: Document calendar.Calendar.firstweekday (GH-128566) (#128579)
(cherry picked from commit b3cbd8f1b5)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2025-01-07 08:05:09 +00:00
Miss Islington (bot)
bbe0b33d2a
[3.13] gh-128146: Exclude os/log.h import on older macOS versions. (GH-128165) (#128575)
gh-128146: Exclude os/log.h import on older macOS versions. (GH-128165)

Reworks the handling of Apple system log handling to account for older macOS
versions that don't provide os-log.
(cherry picked from commit e837a1f71e)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2025-01-07 05:36:00 +00:00
Miss Islington (bot)
d81b99b53b
[3.13] gh-108202: Document calendar.Calendar methods getfirstweekday and setfirstweekday (GH-127579) (#128564)
(cherry picked from commit 953b49e546)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-01-07 00:45:26 +01:00
Miss Islington (bot)
a194fd08c0
[3.13] gh-90241: Clarify documentation for PyUnicode_FSConverter and PyUnicode_FSDecoder (GH-128451) (GH-128542)
(cherry picked from commit 657d7b77e5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2025-01-06 23:20:26 +02:00
Miss Islington (bot)
3678cf8fb9
[3.13] gh-77214: Update outdated documentation for numeric PyArg_Parse formats (GH-128454) (GH-128538)
(cherry picked from commit 8d15058d61)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-01-06 10:56:14 +00:00
Miss Islington (bot)
aa519e4cae
[3.13] gh-114990: Add missing mixin methods in collections.abc's document (GH-114991) (#128535)
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2025-01-06 10:03:05 +00:00
Miss Islington (bot)
9c5a86d23a
[3.13] gh-128519: Align the docstring of untokenize() to match the docs (GH-128521) (#128531)
(cherry picked from commit aef52ca8b3)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-01-06 09:05:54 +00:00
Miss Islington (bot)
838e8a2718
[3.13] Docs: fix MessageDefect references in email.policy docs (GH-128468) (#128526)
(cherry picked from commit 3b231be8f0)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-01-05 22:04:39 +00:00
Miss Islington (bot)
f6da93a627
[3.13] gh-128504: Upgrade doctest to ubuntu-24.04 (GH-128506) (#128517)
gh-128504: Upgrade doctest to ubuntu-24.04 (GH-128506)
(cherry picked from commit 2228e92da3)

Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-01-05 15:58:26 +02:00
Miss Islington (bot)
40fd466c97
[3.13] gh-128437: Add BOLT_COMMON_FLAGS with -update-debug-sections (gh-128455) (gh-128512)
gh-128437: Add `BOLT_COMMON_FLAGS` with `-update-debug-sections` (gh-128455)

Add `BOLT_COMMON_FLAGS` with `-update-debug-sections`

(cherry picked from commit b60044b838)

Co-authored-by: Zanie Blue <contact@zanie.dev>
Co-authored-by: Gregory Szorc <gregory.szorc@gmail.com>
2025-01-05 18:22:34 +09:00
Miss Islington (bot)
b2bacbbea3
[3.13] gh-127553: Remove outdated TODO comment in _pydatetime (GH-127564) (#128500)
(cherry picked from commit e8b6b39ff7)

Co-authored-by: Beomsoo Kim <beoms424@gmail.com>
2025-01-04 23:01:03 +00:00
Miss Islington (bot)
5ed2b7649e
[3.13] gh-127954: Document PyObject_DelItemString (GH-127986) (#128496)
(cherry picked from commit 8ade15343d)

Co-authored-by: RUANG (James Roy) <rruuaanng@outlook.com>
2025-01-04 20:53:30 +00:00
Miss Islington (bot)
62b4ca0d53
[3.13] Docs: amend json.dump() post gh-128482 (GH-128489) (#128493)
(cherry picked from commit 87ee76062a)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2025-01-04 19:03:01 +00:00
Miss Islington (bot)
65fd758098
[3.13] gh-126719: Clarify math.fmod docs (GH-127741) (#128491)
(cherry picked from commit f28d471fbe)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-01-04 17:44:36 +00:00
Miss Islington (bot)
ff7ef94e6e
[3.13] Docs: mark up json.dump() using parameter list (GH-128482) (#128486)
(cherry picked from commit a0088b40bb)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-01-04 15:49:57 +00:00
Miss Islington (bot)
883cb23dd1
[3.13] gh-128152: Argument Clinic: ignore pre-processor directives inside C comments (GH-128464) (#128478)
(cherry picked from commit a4e773c540)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2025-01-04 11:09:25 +00:00
Zanie Blue
855af3bbc6
[3.13] gh-128354: Consistently use LIBS over LDFLAGS in library build… (#128465)
(cherry picked from commit b75ed951d4)
2025-01-04 00:50:13 +00:00
Miss Islington (bot)
b923f4879e
[3.13] gh-128456: Use '-reorder-functions=cdsort' for BOLT builds (GH-128457) (#128461)
'hfsort+' is deprecated in favor of 'cdsort'.

(cherry picked from commit 4974bbdb29)

Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-01-04 00:49:21 +01:00
Miss Islington (bot)
b875917e21
[3.13] gh-127903: Fix a crash on debug builds when calling Objects/unicodeobject::_copy_characters (GH-127876) (#128458)
gh-127903: Fix a crash on debug builds when calling `Objects/unicodeobject::_copy_characters`` (GH-127876)
(cherry picked from commit 46cb6340d7)

Co-authored-by: Alexander Shadchin <shadchin@yandex-team.com>
2025-01-03 21:20:30 +02:00
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