Commit graph

120181 commits

Author SHA1 Message Date
Miss Islington (bot)
b773f591a8
[3.12] gh-128731: Explicitly close socket on error in robotparser.RobotFileParser.read() (GH-128733) (GH-128756)
(cherry picked from commit 5e65a1acc0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-01-12 13:34:24 +00:00
Serhiy Storchaka
c20c551ce3
[3.12] gh-128734: Explicitly close sockets in urllib tests (GH-128735) (GH-128750)
(cherry picked from commit 5ace71713b)
2025-01-12 11:30:07 +00:00
Damien
a600439e42
[3.12] gh-122544: Change OS image in GitHub Actions to Ubuntu 24.04 (#122566) (#126621)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-01-12 00:23:53 +02:00
Miss Islington (bot)
07a65cdcc5
[3.12] gh-128302: Fix bugs in xml.dom.xmlbuilder (GH-128284) (#128583)
gh-128302: Fix bugs in xml.dom.xmlbuilder (GH-128284)

* Allow DOMParser.parse() to correctly handle DOMInputSource instances
  that only have a systemId attribute set.
* Fix DOMEntityResolver.resolveEntity(), which was broken by the
  Python 3.0 transition.
* Add Lib/test/test_xml_dom_xmlbuilder.py with few tests.
(cherry picked from commit 6ea04da270)

Co-authored-by: Stephen Morton <git@tungol.org>
2025-01-11 13:30:29 +02:00
Miss Islington (bot)
b55c40419e
[3.12] gh-126862: Use Py_ssize_t instead of int when processing the number of super-classes (GH-127523) (#128700)
gh-126862: Use `Py_ssize_t` instead of `int` when processing the number of super-classes  (GH-127523)
(cherry picked from commit 2fcdc8488c)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-01-10 03:51:45 +00:00
Miss Islington (bot)
8bfc68f0f5
[3.12] gh-124433: fix docs for asyncio.Queue.task_done (GH-128669) (#128672)
gh-124433: fix docs for `asyncio.Queue.task_done` (GH-128669)
(cherry picked from commit 4322a318ea)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-01-09 12:28:15 +00:00
Miss Islington (bot)
182234f5ea
[3.12] gh-126137: improve docs for loop.add_reader and loop.add_writer (GH-128666) (#128668)
gh-126137: improve docs for `loop.add_reader` and `loop.add_writer` (GH-128666)
(cherry picked from commit b2adf55674)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-01-09 10:18:23 +00:00
Miss Islington (bot)
a784cdf6e7
[3.12] gh-79149: document reentrant safety of loop.call_soon_threadsafe (GH-128662) (#128665)
gh-79149: document reentrant safety of `loop.call_soon_threadsafe` (GH-128662)
(cherry picked from commit 4685401845)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2025-01-09 09:26:40 +00:00
Miss Islington (bot)
4c130c9238
[3.12] gh-128615: Cover pickling of ParamSpecArgs and ParamSpecKwargs (GH-128616) (#128626)
Co-authored-by: sobolevn <mail@sobolevn.me>
2025-01-08 12:25:59 +00:00
Miss Islington (bot)
b69b9da9b5
[3.12] gh-41872: Fix quick extraction of module docstrings from a file in pydoc (GH-127520) (GH-128621)
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:30 +02:00
Miss Islington (bot)
d8890fb82d
[3.12] gh-128613: Increase typing.Concatenate coverage (GH-128614) (#128624)
gh-128613: Increase `typing.Concatenate` coverage (GH-128614)
(cherry picked from commit eb26e17069)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-01-08 12:20:00 +00:00
Miss Islington (bot)
e903b8ad13
[3.12] gh-87506: Document that json.load*() can raise UnicodeDecodeError (GH-127355) (#128608)
(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:51:19 +00:00
Erlend E. Aasland
b46addafb1
[3.12] gh-123085: Remove double 'import os' added by PR #124021 (#128600)
gh-123085: Remove double 'import os' added by PR #124021
2025-01-07 19:23:17 -05:00
Erlend E. Aasland
6b3371914c
[3.12] gh-127614: Correctly check for ttyname_r() in configure (#128503) (#128599)
(cherry picked from commit e08b28235a)

PR #14868 replaced the ttyname() call with ttyname_r(), but the old
check remained.
2025-01-07 22:05:42 +00:00
Miss Islington (bot)
82b061d711
[3.12] Docs: mark up json.load() using parameter list (GH-128488) (#128597)
(cherry picked from commit a21e31ec54)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2025-01-07 21:14:50 +00:00
Miss Islington (bot)
dae5b16bb3
[3.12] gh-98188: Fix EmailMessage.get_payload to decode data when CTE value has extra text (GH-127547) (#128529)
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:44:56 -05:00
Miss Islington (bot)
e758eb3018
[3.12] gh-123085: _compile_importlib: Avoid copying sources before compilation (GH-124131) (GH-128581)
gh-123085: _compile_importlib: Avoid copying sources before compilation (GH-124131)
(cherry picked from commit 42c8b0556c)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2025-01-07 12:28:03 +01:00
Miss Islington (bot)
adddbc3de9
[3.12] gh-108202: Document calendar.Calendar.firstweekday (GH-128566) (#128580)
(cherry picked from commit b3cbd8f1b5)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2025-01-07 08:06:52 +00:00
Miss Islington (bot)
115d5043b1
[3.12] gh-128472: Add -skip-funcs to BOLT options to fix computed goto errors (gh-128511) (gh-128572)
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-07 14:21:43 +09:00
Miss Islington (bot)
fb8bb36f56
[3.12] gh-108202: Document calendar.Calendar methods getfirstweekday and setfirstweekday (GH-127579) (#128565)
(cherry picked from commit 953b49e546)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-01-06 23:46:16 +00:00
Miss Islington (bot)
8788a9570f
[3.12] gh-90241: Clarify documentation for PyUnicode_FSConverter and PyUnicode_FSDecoder (GH-128451) (GH-128543)
(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:55 +02:00
Miss Islington (bot)
498da39b0d
[3.12] gh-77214: Update outdated documentation for numeric PyArg_Parse formats (GH-128454) (GH-128539)
(cherry picked from commit 8d15058d61)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-01-06 10:57:26 +00:00
Miss Islington (bot)
8ba72caf26
[3.12] gh-114990: Add missing mixin methods in collections.abc's document (GH-114991) (#128536)
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2025-01-06 10:04:57 +00:00
Miss Islington (bot)
f9aac4a76d
[3.12] gh-128519: Align the docstring of untokenize() to match the docs (GH-128521) (#128532)
(cherry picked from commit aef52ca8b3)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-01-06 08:59:24 +00:00
Miss Islington (bot)
4016be2775
[3.12] Docs: fix MessageDefect references in email.policy docs (GH-128468) (#128527)
(cherry picked from commit 3b231be8f0)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-01-05 22:05:48 +00:00
Jason R. Coombs
d712ece43f
[3.12] gh-123085: Fix issue in inferred caller when resources package has no source (GH-123102) (#124021)
gh-123085: Fix issue in inferred caller when resources package has no source.

From importlib_resources 6.4.3 (python/importlib_resourcesGH-314).
(cherry picked from commit a53812df12)
2025-01-05 16:53:55 -05:00
Miss Islington (bot)
09f7d88cad
[3.12] gh-128504: Upgrade doctest to ubuntu-24.04 (GH-128506) (#128518)
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:02 +02:00
Miss Islington (bot)
90535fe021
[3.12] gh-128437: Add BOLT_COMMON_FLAGS with -update-debug-sections (gh-128455) (gh-128513)
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:23:04 +09:00
Miss Islington (bot)
06e4173393
[3.12] gh-127553: Remove outdated TODO comment in _pydatetime (GH-127564) (#128501)
(cherry picked from commit e8b6b39ff7)

Co-authored-by: Beomsoo Kim <beoms424@gmail.com>
2025-01-04 22:55:24 +00:00
Miss Islington (bot)
e1a20910dc
[3.12] gh-127954: Document PyObject_DelItemString (GH-127986) (#128497)
(cherry picked from commit 8ade15343d)

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

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2025-01-04 19:04:13 +00:00
Miss Islington (bot)
98d3f2bc6e
[3.12] gh-126719: Clarify math.fmod docs (GH-127741) (#128492)
(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:45:19 +00:00
Miss Islington (bot)
731fc4052c
[3.12] Docs: mark up json.dump() using parameter list (GH-128482) (#128487)
(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:50:55 +00:00
Zanie Blue
f2cc565b99
[3.12] gh-128354: Consistently use LIBS over LDFLAGS in library build… (#128466)
(cherry picked from commit b75ed951d4)
2025-01-04 00:47:08 +00:00
Miss Islington (bot)
d56e50229e
[3.12] gh-128456: Use '-reorder-functions=cdsort' for BOLT builds (GH-128457) (#128462)
'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:05 +01:00
Miss Islington (bot)
e44045924d
[3.12] gh-127903: Fix a crash on debug builds when calling Objects/unicodeobject::_copy_characters (GH-127876) (#128459)
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:21:08 +02:00
Miss Islington (bot)
d9e199b491
[3.12] gh-125674: Doc: Fix type of newfunc first parameter (GH-125675) (#128448)
(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:13:18 +00:00
Miss Islington (bot)
0d3f4b6a2f
[3.12] gh-108202: Document calendar.TextCalendar formatting helpers (GH-127608) (#128441)
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:38 +00:00
Serhiy Storchaka
7ce09fc93b
[3.12] gh-128014: Fix passing default='' to the tkinter method wm_iconbitmap() (GH-128015) (GH-128420)
(cherry picked from commit 58e9f95c4a)

Co-authored-by: Zhikang Yan <2951256653@qq.com>
2025-01-02 16:21:00 +00:00
Miss Islington (bot)
52c08ed029
[3.12] Revert "Doc: Show object descriptions in the table of contents (GH-125757)" (GH-128406) (#128414)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-01-02 14:41:25 +00:00
Miss Islington (bot)
84c8843490
[3.12] gh-123925: Fix building curses on platforms without libncursesw (GH-128405) (GH-128408)
(cherry picked from commit 8d16919a06)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-01-02 11:54:43 +00:00
Miss Islington (bot)
487caa9579
[3.12] gh-128349: Use .. data:: instead of .. class:: for pre-defined decimal Context objects (GH-128379) (#128402)
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:30:39 +00:00
Miss Islington (bot)
7fcba2e3a9
[3.12] Reword about.rst to not limit Sphinx (GH-128325) (#128383)
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:31:21 +00:00
Miss Islington (bot)
ca017a171a
[3.12] gh-88834: Unify the instance check for typing.Union and types.UnionType (GH-128363) (GH-128371)
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 08:19:45 +00:00
Miss Islington (bot)
fcc9bc49c4
[3.12] gh-128342: Specify timeout unit in subprocess docstrings (GH-128343) (#128366)
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 13:14:27 -08:00
Miss Islington (bot)
4ddee55c5c
[3.12] gh-128321: Set LIBS instead of LDFLAGS when checking sqlite3 requirements (GH-128322) (#128355)
(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:42:49 +00:00
Miss Islington (bot)
b22d0fcbe1
[3.12] gh-128317: Document calendar.TextCalendar.formatweek (GH-128353) (#128358)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-12-30 19:40:31 +02:00
Miss Islington (bot)
be7314ffac
[3.12] gh-127586: multiprocessing.Pool does not properly restore blocked signals (try 2) (GH-128011) (#128299)
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:59 -08:00
Miss Islington (bot)
3a726be127
[3.12] Mention loop_factory argument in docstring for asyncio.run() (GH-128288) (#128292)
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:15:40 +00:00
Shantanu
82dbfbfec9
[3.12] gh-127537: Add __class_getitem__ to the python implementation of functools.partial (#127537) (#128282)
gh-127537: Add __class_getitem__ to the python implementation of functools.partial (#127537)

(cherry picked from commit 401bba6b58)

Co-authored-by: CF Bolz-Tereick <cfbolz@gmx.de>
2024-12-27 01:25:07 +00:00