Commit graph

123820 commits

Author SHA1 Message Date
Miss Islington (bot)
f7d885a8ff
[3.13] gh-129873: IDLE: Improve help.py's method of parsing HTML (GH-129859) (#129884)
gh-129873: IDLE: Improve help.py's method of parsing HTML (GH-129859)

In `help.copy_strip`, only copy the text `<section>`.  In `help.HelpParser.handle_starttag` and elsewhere, remove code to skip the no longer present html.  Add a reminder at the top of idle.rst to run copy_strip after changes.
---------

(cherry picked from commit 6fbf15f98e)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-02-09 04:19:36 -05:00
Terry Jan Reedy
c28eed3c27
[3.13] gh-129876: Initial 3.14 News3.txt entries (GH-129881) (#129882) 2025-02-09 07:36:37 +00:00
Miss Islington (bot)
1a288989bf
[3.13] gh-112953: Update news to finish 3.13 as main (GH-129877) (#129878)
Entry for patch to 3.13.rc3
(cherry picked from commit f72977b2f4)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-02-09 06:37:29 +00:00
Miss Islington (bot)
3cf859056a
[3.13] gh-129699: Add description to IDLE doc title (GH-129727) (#129864)
gh-129699: Add description to IDLE doc title (GH-129727)

Also extend the 'idlelib' section header. These additions affect both the displayed idle.html file and the contents.html file displayed by clicking the Complete table of contents link on the main docs.python.org page. (The module index entries are generated from the module name and synopsis within module files.)
---------

(cherry picked from commit 33a7094aa6)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-02-08 20:14:47 +00:00
Miss Islington (bot)
9497e9d77d
[3.13] gh-64414: mention AF_INET6 and IPv6 in socketserver docs. (GH-129866) (#129868)
gh-64414: mention AF_INET6 and IPv6 in socketserver docs. (GH-129866)

mention AF_INET6 and IPv6 in socketserver docs.
(cherry picked from commit 5ce70ad129)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-02-08 20:12:22 +00:00
Tomasz Pytel
4a1389ced4
[3.13] gh-128657: fix _hashopenssl ref/data race (GH-128886) (GH-129853)
(cherry picked from commit 6c67904e79)
2025-02-08 10:59:30 -05:00
Miss Islington (bot)
8a7146c5eb
[3.13] gh-117657: Fix data race in dict_dict_merge (gh-129755) (gh-129808)
Found while running `test_load_attr_module` from `test_opcache` under TSan.
(cherry picked from commit 34379d0a59)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2025-02-07 10:18:57 -05:00
Miss Islington (bot)
aae0a1f904
[3.13] Add multinomial to the itertools recipes docs (gh-129760) (gh-129762) 2025-02-06 18:45:15 -06:00
Donghee Na
f7af8bc58a
[3.13] gh-129533: Update PyGC_Enable/Disable/IsEnabled to use atomic operat… (gh-129756)
gh-129533: Update PyGC_Enable/Disable/IsEnabled to use atomic operation  (gh-129563)

(cherry picked from commit b184abf074)
2025-02-06 23:11:17 +00:00
Sam Gross
f7cc862345
[3.13] gh-129732: Fix race on shared->array in qsbr code under free-threading (gh-129738) (gh-129747)
The read of `shared->array` should happen under the lock to avoid a race.
(cherry picked from commit b4ff8b22b3)

Co-authored-by: Peter Hawkins <phawkins@google.com>
2025-02-06 14:30:16 -05:00
Sam Gross
356a9e646c
[3.13] gh-129668: Fix thread-safety of MemoryError freelist in free threaded build (gh-129704) (gh-129742)
The MemoryError freelist was not thread-safe in the free threaded build.
Use a mutex to protect accesses to the freelist. Unlike other freelists,
the MemoryError freelist is not performance sensitive.

(cherry picked from commit 51b4edb1a4)
2025-02-06 13:27:30 -05:00
Miss Islington (bot)
de84531a3e
[3.13] gh-112020: Rework socketserver examples to be correct (GH-129741) (#129743)
gh-112020: Rework socketserver examples to be correct.

Outdated code updated, the BaseRequestHandler example is now much more
illustrative instead of the bad idea of a single recv() call for TCP.

tested, they now work.
(cherry picked from commit 78377c788e)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-02-06 17:49:19 +00:00
Miss Islington (bot)
0f7e6d78ea
[3.13] Remove an inaccurate note from socket.recv (GH-129733) (#129734)
Remove an inaccurate note from `socket.recv` (GH-129733)

Remove an inaccurate note from socket.recv.
(cherry picked from commit ded54c3baa)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-02-06 09:45:28 -08:00
Adam Turner
aaf0581d2a
[3.13] GH-121970: Extract `implementation_detail` into a new extension (GH-129663) (#129739)
(cherry picked from commit 4d56c40440)
2025-02-06 17:30:03 +00:00
🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)
b5eed8c80e
[3.13] Merge TSAN test matrices in CI (#123278) (#129673) 2025-02-06 15:37:22 +02:00
sobolevn
8529d6414f
[3.13] gh-129643: Fix PyList_Insert in free-threading builds (GH-129680) (#129725)
(cherry picked from commit 63f0406d5a)
2025-02-06 13:22:41 +00:00
Miss Islington (bot)
fc78ed9e6f
[3.13] gh-118915: Fix bad link in documentation (GH-129691) (GH-129723)
gh-118915: Fix bad link in documentation (GH-129691)
(cherry picked from commit 779d06945c)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2025-02-06 13:47:07 +01:00
Miss Islington (bot)
431fda202d
[3.13] gh-86206: Change IDLE splash line (GH-129698) (#129717)
Replace references to boilerplate files available in About IDLE and instead suggest clicking Help menu.

(cherry picked from commit d83a8a26f5)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-02-06 03:20:05 -05:00
Miss Islington (bot)
825c6e4dd7
[3.13] gh-69001: Replace maintainer email in IDLE credits (GH-129588) (#129713)
Instead, anyone requesting credit should submit a PR with contribution summary.
(Also fix typo in existing name.)
(cherry picked from commit 76e0182948)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-02-06 07:37:50 +00:00
Miss Islington (bot)
7eba097137
[3.13] gh-128772: Fix pydoc for methods with __module__ is None (GH-129177) (GH-129653)
(cherry picked from commit 979d766209)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-02-05 14:42:51 +00:00
neonene
19ceb342b5
[3.13] gh-129660: Do not use test_embed in PGO profile builds (#129662) 2025-02-05 12:22:30 +01:00
Kumar Aditya
b081091623
[3.13] gh-129643: fix thread safety of PyList_SetItem (#129644) (#129677)
gh-129643: fix thread safety of `PyList_SetItem` (#129644)
2025-02-05 08:09:37 +00:00
Thomas Wouters
4f0261561a Merge branch '3.13' of https://github.com/python/cpython into 3.13 2025-02-04 20:40:10 +01:00
Thomas Wouters
45d136d7e3 Post 3.13.2 2025-02-04 20:37:26 +01:00
Miss Islington (bot)
c66336ab02
[3.13] gh-129646: Update the locale alias mapping (GH-129647) (GH-129658)
(cherry picked from commit f61afca262)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-02-04 18:31:20 +02:00
Thomas Wouters
4f8bb3947c Python 3.13.2 2025-02-04 15:51:09 +01:00
Miss Islington (bot)
7935c0fd5f
[3.13] gh-129350: Make tests for glob with trailing slash more strict (GH-129376) (GH-129651)
Test that the trailing pathname separator is preserved.

Multiple trailing pathname separators are only preserved if the pattern
does not contain metacharacters, otherwise only one trailing pathname
separator is preserved. This is rather an implementation detail.
(cherry picked from commit 8b5c8508c7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-02-04 14:49:14 +00:00
Serhiy Storchaka
4cf3e80eee
[3.13] Use roles :data: and :const: for referencing module variables (GH-129507) (GH-129649)
(cherry picked from commit 078ab828b9)
2025-02-04 14:25:18 +00:00
donBarbos
08b045c438
[3.13] gh-127349: Add check for correct resizing in REPL (GH-127387) (#129485)
(cherry picked from commit 510fefdc62)
2025-02-04 15:18:22 +01:00
Miss Islington (bot)
506c76f1bd
[3.13] gh-129502: Fix handling errors in ctypes callbacks (GH-129504) (#129517)
gh-129502: Fix handling errors in ctypes callbacks (GH-129504)

Unlikely errors in preparing arguments for ctypes callback are now
handled in the same way as errors raised in the callback of in converting
the result of the callback -- using sys.unraisablehook() instead of
sys.excepthook() and not setting sys.last_exc and other variables.
(cherry picked from commit 9d63ae5fe5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-02-04 00:05:51 +00:00
Miss Islington (bot)
646bd7958e
[3.13] gh-128696: Add arm64 to the get_platform return val description (GH-128701) (#128774)
gh-128696: Add arm64 to the get_platform return val description (GH-128701)
(cherry picked from commit 553cdc6d68)

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
2025-02-03 23:56:23 +00:00
Miss Islington (bot)
de27372234
[3.13] gh-129345: null check for indent syslogmodule (GH-129348) (#129442)
gh-129345: null check for indent syslogmodule (GH-129348)
(cherry picked from commit 25cf79a082)

Co-authored-by: Burkov Egor <xwooffie@gmail.com>
2025-02-04 00:37:24 +01:00
Miss Islington (bot)
9120330354
[3.13] gh-128078: Use PyErr_SetRaisedException in _PyGen_SetStopIterationValue (GH-128287) (#128789)
gh-128078: Use `PyErr_SetRaisedException` in `_PyGen_SetStopIterationValue` (GH-128287)
(cherry picked from commit 402b91da87)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-02-04 00:34:02 +01:00
Miss Islington (bot)
186165e509
[3.13] gh-101944: Clarify PyModule_AddObjectRef() documentation (GH-129433) (#129612)
gh-101944: Clarify PyModule_AddObjectRef() documentation (GH-129433)
(cherry picked from commit 04264a286e)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-02-03 12:02:00 +00:00
Miss Islington (bot)
85e162087f
[3.13] gh-129407: Clarify that a SystemError isn't always CPython's fault (GH-129410) (#129610)
gh-129407: Clarify that a `SystemError` isn't always CPython's fault (GH-129410)
(cherry picked from commit 39b754a359)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-02-03 11:52:29 +00:00
Miss Islington (bot)
9862800a71
[3.13] gh-126609: Allow translating the `availability` directive (GH-129549) (#129584)
gh-126609: Allow translating the ``availability`` directive (GH-129549)
(cherry picked from commit 0612a89ffc)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-02-03 08:28:11 +00:00
Miss Islington (bot)
b13b76f98a
[3.13] gh-127975: Avoid reusing quote types in ast.unparse if not needed (GH-127980) (#129600)
gh-127975: Avoid reusing quote types in ast.unparse if not needed (GH-127980)
(cherry picked from commit 8df5193d37)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2025-02-03 00:38:44 +00:00
Miss Islington (bot)
d75e9a0954
[3.13] gh-105875: amend sqlite3 docstring wrt. SQLite requirement (GH-129599) (#129602)
(cherry picked from commit ecd2f84555)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2025-02-02 23:26:38 +00:00
Jason R. Coombs
6aa09a5898
[3.13] gh-127096: Do not recreate unnamed section on every read in ConfigParser (GH-127228) (#129593)
* Do not recreate unnamed section on every read in ConfigParser

* Remove duplicate section creation code
(cherry picked from commit 914c232e93)

Co-authored-by: Andrey Efremov <duxus@yandex.ru>
2025-02-02 18:53:23 +00:00
Collin Funk
65f3432ac3
[3.13] gh-129539: Include sysexits.h before checking EX_OK (#129590)
Previously, the macro would be redefined when the header was included.
2025-02-02 19:37:32 +01:00
Adam Turner
63cae73797
[3.13] GH-121970: Extract `misc_news` into a new extension (GH-129577) (#129586)
(cherry picked from commit ae4788809d)
2025-02-02 16:24:48 +00:00
Miss Islington (bot)
e9febe51af
[3.13] gh-115514: Fix incomplete writes after close while using ssl in asyncio(GH-128037) (#129581)
gh-115514: Fix incomplete writes after close while using ssl in asyncio(GH-128037)

(cherry picked from commit 4e38eeafe2)

Co-authored-by: Vojtěch Boček <vbocek@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-02-02 16:12:12 +00:00
Miss Islington (bot)
90e526ae67
[3.13] gh-105704: Disallow square brackets ([ and ]) in domain names for parsed URLs (GH-129418) (GH-129526)
gh-105704: Disallow square brackets (`[` and `]`) in domain names for parsed URLs (GH-129418)

* gh-105704: Disallow square brackets ( and ) in domain names for parsed URLs

* Use Sphinx references



* Add mismatched bracket test cases, fix news format

* Add more test coverage for ports

---------

(cherry picked from commit d89a5f6a6e)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-02-02 00:12:51 -08:00
Miss Islington (bot)
1459d08b56
[3.13] gh-119461: Restore the testSocket VSOCK skipUnless removed by PR GH-119465 (GH-129561) (#129564)
gh-119461: Restore the testSocket VSOCK skipUnless removed by PR GH-119465 (GH-129561)

Restore the skipUnless removed by GH-119465.

This test can only pass on virtual machines, not actual machines.

actual machines see:

```
    self.cli.connect((cid, VSOCKPORT))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
OSError: [Errno 19] No such device
```

Reproduced on (Linux) Ubuntu 24.04.1 running 6.8.0-52-generic.
(cherry picked from commit e1006ce1de)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-02-02 05:11:30 +00:00
Miss Islington (bot)
2d60dcfda9
[3.13] gh-126022: Replace TeX quotation marks with `"` in Doc/license.rst (GH-129535) (#129551)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-02-01 16:57:58 +00:00
Miss Islington (bot)
0468ea1230
[3.13] gh-126108: Fix potential null pointer dereference in PySys_AddWarnOptionUnicode (GH-126118) (#129520)
gh-126108: Fix potential null pointer dereference in `PySys_AddWarnOptionUnicode` (GH-126118)
(cherry picked from commit fad36bf382)

Co-authored-by: Valery Fedorenko <federicovalenso@gmail.com>
2025-01-31 20:32:44 +05:30
Victor Stinner
9a59a51733
[3.13] gh-111495: Add PyFile tests (#129449) (#129477)
gh-111495: Add PyFile tests (#129449)

Add tests for the following functions in test_capi.test_file:

* PyFile_FromFd()
* PyFile_GetLine()
* PyFile_NewStdPrinter()
* PyFile_WriteObject()
* PyFile_WriteString()
* PyObject_AsFileDescriptor()

Add Modules/_testlimitedcapi/file.c file.

Remove test_embed.StdPrinterTests which became redundant.

(cherry picked from commit 4ca9fc08f8)
2025-01-30 20:29:27 +01:00
Irit Katriel
a853e2f076
[3.13] gh-128799: Add frame of except* to traceback when wrapping a naked exception (#128971) (#129299) 2025-01-30 12:20:13 +00:00
Miss Islington (bot)
fcb265671c
[3.13] gh-129438: Update `--enable-experimental-jit` section with install requirements (GH-129450) (#129472)
gh-129438: Update ``--enable-experimental-jit`` section with install requirements (GH-129450)

Add a note to the `JIT` docs that building CPython with `JIT` requires Python 3.11 or newer.

(cherry picked from commit 652f66ac38)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
2025-01-30 10:22:05 +00:00
Miss Islington (bot)
ad4a141a6b
[3.13] gh-129403: Fix ValueError messages in asyncio.Barrier and threading.Barrier (GH-129419) (#129468)
gh-129403: Fix `ValueError` messages in `asyncio.Barrier` and `threading.Barrier` (GH-129419)
(cherry picked from commit bcb25d60b1)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-01-30 09:33:30 +00:00