Commit graph

120286 commits

Author SHA1 Message Date
Miss Islington (bot)
3d2ca741dc
[3.12] gh-126554: correct detection of gcc for TestNullDlsym.test_null_dlsym (GH-129872) (#129945)
gh-126554: correct detection of `gcc` for `TestNullDlsym.test_null_dlsym` (GH-129872)

In case gcc is not available, the test will fail with FileNotFoundError.
So catch the exception to skip the test correctly.
(cherry picked from commit 978211c8a8)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Co-authored-by: Peter Marko <peter.marko@siemens.com>
2025-02-10 10:08:18 +00:00
Miss Islington (bot)
774458884b
[3.12] gh-68400: Remove outdated 2.7 comment (GH-129919) (#129938)
(cherry picked from commit d9bf3c16e5)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-02-10 05:10:02 +00:00
Erlend E. Aasland
02e00a7373
[3.12] gh-129603: Don't segfault if sqlite3.Row description is None (#129604) (#129924)
(cherry picked from commit 7e6ee50b6b)
2025-02-10 00:14:40 +00:00
Miss Islington (bot)
23eccaebf3
[3.12] gh-129892: Doc: Remove unnecessary role directive in graphlib.py (GH-129896) (#129905)
gh-129892: Doc: Remove unnecessary role directive in graphlib.py (GH-129896)

Change `:exec:ValueError` to `ValueError` in `TopologicalSorter.done()` docstring
(cherry picked from commit c53730171f)

Co-authored-by: Nikola Savic <76233425+nikolasavic3@users.noreply.github.com>
2025-02-09 15:39:23 +00:00
Miss Islington (bot)
fd8d445cb3
[3.12] gh-129873: IDLE: Improve help.py's method of parsing HTML (GH-129859) (#129885)
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:55 -05:00
Terry Jan Reedy
550ec5cf35
[3.12] gh-129876: Initial 3.14 News3.txt entries (GH-129881) (#129883) 2025-02-09 07:32:52 +00:00
Miss Islington (bot)
a5e04513df
[3.12] gh-112953: Update news to finish 3.13 as main (GH-129877) (#129879)
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:30:46 +00:00
Miss Islington (bot)
d42eba880e
[3.12] gh-64414: mention AF_INET6 and IPv6 in socketserver docs. (GH-129866) (#129869)
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:13:40 +00:00
Miss Islington (bot)
5c527f8ddc
[3.12] gh-129699: Add description to IDLE doc title (GH-129727) (#129865)
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 19:42:43 +00:00
Bénédikt Tran
1581c9d936
[3.12] Add multinomial to the itertools recipes docs (gh-129760) (gh-129854) 2025-02-08 08:10:41 -06:00
Miss Islington (bot)
7ff8e8dbd5
[3.12] gh-112020: Rework socketserver examples to be correct (GH-129741) (#129744)
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:53:30 +00:00
Miss Islington (bot)
de9380558b
[3.12] Remove an inaccurate note from socket.recv (GH-129733) (#129735)
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:33 -08:00
Adam Turner
3dc5bcee67
[3.12] GH-121970: Extract `implementation_detail` into a new extension (GH-129663) (#129740)
(cherry picked from commit 4d56c40440)
2025-02-06 17:33:13 +00:00
🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)
895e23d2c3
[3.12] Merge TSAN test matrices in CI (#123278) (#129674) 2025-02-06 16:46:00 +00:00
Miss Islington (bot)
1a0fbc7813
[3.12] gh-86206: Change IDLE splash line (GH-129698) (#129718)
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:31 -05:00
Miss Islington (bot)
e7fb38186e
[3.12] gh-69001: Replace maintainer email in IDLE credits (GH-129588) (#129714)
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:03:21 +00:00
Miss Islington (bot)
62fafd867d
[3.12] gh-129660: Do not use test_embed in PGO profile builds (GH-129662) (#129685)
[3.13] gh-129660: Do not use test_embed in PGO profile builds (GH-129662)
(cherry picked from commit 19ceb342b5)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
2025-02-05 11:39:58 +00:00
Thomas Wouters
8b0c113325 Merge branch '3.12' of https://github.com/python/cpython into 3.12 2025-02-04 20:39:37 +01:00
Thomas Wouters
ab1a9a21f5 Post 3.12.9 2025-02-04 20:37:20 +01:00
Miss Islington (bot)
0d207c3dd1
[3.12] gh-128772: Fix pydoc for methods with __module__ is None (GH-129177) (GH-129654)
(cherry picked from commit 979d766209)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-02-04 14:44:02 +00:00
Miss Islington (bot)
676ee57bd6
[3.12] gh-129350: Make tests for glob with trailing slash more strict (GH-129376) (GH-129652)
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:42:14 +00:00
Thomas Wouters
fdb81425a9 Python 3.12.9 2025-02-04 15:38:38 +01:00
Serhiy Storchaka
0d51b29806
[3.12] Use roles :data: and :const: for referencing module variables (GH-129507) (GH-129650)
(cherry picked from commit 078ab828b9)
2025-02-04 14:30:57 +00:00
Serhiy Storchaka
86451b146a
[3.12] gh-129502: Fix handling errors in ctypes callbacks (GH-129504) (#129639)
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)
2025-02-04 15:04:46 +01:00
Miss Islington (bot)
4879257d0c
[3.12] gh-97850: Remove the mention of removal from ResourceReader docs (GH-128602) (#128655)
gh-97850: Remove the mention of removal from `ResourceReader` docs (GH-128602)

Remove the mention of removal from ResourceReader docs
(cherry picked from commit a1284e9797)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-02-04 00:29:45 +01:00
Miss Islington (bot)
e4384d1544
[3.12] gh-128696: Add arm64 to the get_platform return val description (GH-128701) (#128773)
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-04 00:29:16 +01:00
Miss Islington (bot)
64396fb124
[3.12] gh-128078: Use PyErr_SetRaisedException in _PyGen_SetStopIterationValue (GH-128287) (#128790)
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:28:14 +01:00
Miss Islington (bot)
6985b4be9b
[3.12] gh-129345: null check for indent syslogmodule (GH-129348) (#129443)
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:24:56 +01:00
Miss Islington (bot)
a7645468c2
[3.12] gh-101944: Clarify PyModule_AddObjectRef() documentation (GH-129433) (#129613)
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:31 +00:00
Victor Stinner
6186021c14
[3.12] gh-129539: Include sysexits.h before checking EX_OK (#129590) (#129609)
[3.13] gh-129539: Include sysexits.h before checking EX_OK (#129590)

Previously, the macro would be redefined when the header was included.

(cherry picked from commit 65f3432ac3)

Co-authored-by: Collin Funk <collin.funk1@gmail.com>
2025-02-03 12:00:10 +00:00
Miss Islington (bot)
eff45c9b1e
[3.12] gh-129407: Clarify that a SystemError isn't always CPython's fault (GH-129410) (#129611)
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:54:16 +00:00
Miss Islington (bot)
97097469c7
[3.12] gh-127975: Avoid reusing quote types in ast.unparse if not needed (GH-127980) (#129601)
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-02 22:58:22 +00:00
Adam Turner
834b9d65a9
[3.12] GH-121970: Extract `misc_news` into a new extension (GH-129577) (#129587)
(cherry picked from commit ae4788809d)
2025-02-02 16:26:50 +00:00
Miss Islington (bot)
14bd0fc19a
[3.12] gh-126609: Allow translating the `availability` directive (GH-129549) (#129585)
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-02 16:18:50 +00:00
Miss Islington (bot)
e20963a12a
[3.12] gh-115514: Fix incomplete writes after close while using ssl in asyncio(GH-128037) (#129582)
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 15:47:37 +00:00
Miss Islington (bot)
a7084f6075
[3.12] gh-105704: Disallow square brackets ([ and ]) in domain names for parsed URLs (GH-129418) (GH-129527)
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 08:30:28 +00:00
Miss Islington (bot)
368ba55819
[3.12] gh-119461: Restore the testSocket VSOCK skipUnless removed by PR GH-119465 (GH-129561) (#129565)
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:04:45 +00:00
Hugo van Kemenade
580d781094
[3.12] gh-126022: Replace TeX quotation marks with `"` in Doc/license.rst (GH-129535) (#129554)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-02-01 19:16:38 +02:00
Miss Islington (bot)
40d7f745e9
[3.12] gh-126108: Fix potential null pointer dereference in PySys_AddWarnOptionUnicode (GH-126118) (#129522)
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:30 +05:30
Victor Stinner
48f08fe6c8
[3.12] gh-111495: Add PyFile tests (#129449) (#129477) (#129501)
[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()

Remove test_embed.StdPrinterTests which became redundant.

(cherry picked from commit 4ca9fc08f8)
(cherry picked from commit 9a59a51733)
2025-01-31 10:27:35 +01:00
Irit Katriel
d2f551db12
[3.12] gh-128799: Add frame of except* to traceback when wrapping a naked exception (GH-128971) (#129328) 2025-01-30 12:02:46 +00:00
Miss Islington (bot)
ddb314f598
[3.12] remove type annotations from multiprocessing. (GH-129381) (#129471)
remove type annotations from multiprocessing. (GH-129381)

* remove type annotations from multiprocessing.

One of them was technically invalid per typing specs... but since we're not
checking these in the stdlib today lets elide them.

https://discuss.python.org/t/static-type-annotations-in-cpython/65068/13

* use the actual comment style annotation format



---------
(cherry picked from commit 71aecc284e)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
2025-01-30 09:08:31 +00:00
Miss Islington (bot)
f463d05a09
[3.12] gh-129403: Fix ValueError messages in asyncio.Barrier and threading.Barrier (GH-129419) (#129469)
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 08:28:06 +00:00
Miss Islington (bot)
c0ae83af95
[3.12] gh-125522: Fix bare except in test_uuid (GH-129018) (#129456)
gh-125522: Fix bare except in `test_uuid` (GH-129018)
(cherry picked from commit a1a4e9f39a)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-01-29 21:16:47 +00:00
Miss Islington (bot)
f65aa0d1bf
[3.12] gh-118761: Improve import time of subprocess (GH-129427) (#129448)
gh-118761: Improve import time of `subprocess` (GH-129427)

* subprocess: lazy import signal and locale to improve module import time
(cherry picked from commit 49f24650e4)

Co-authored-by: Taneli Hukkinen <3275109+hukkin@users.noreply.github.com>
2025-01-29 16:48:48 +00:00
Hugo van Kemenade
0e54315c31
[3.12]: CI: Change job name to 'build arm64' on Windows (#129434) (#129444)
CI: Change job name to 'build arm64' on Windows (#129434)

(cherry picked from commit c67afb581e)
2025-01-29 14:47:50 +00:00
Miss Islington (bot)
cdaec318cb
[3.12] gh-129409: Fix Integer overflow - SEGV while writing data more than 2GB in CSV file (GH-129413) (#129437)
gh-129409: Fix Integer overflow -  SEGV while writing data more than 2GB in CSV file (GH-129413)
(cherry picked from commit 97b0ef05d9)

Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్  రెడ్డి) <thatiparthysreenivas@gmail.com>
2025-01-29 11:32:54 +00:00
Miss Islington (bot)
e5ab9e3740
[3.12] gh-112064: Fix incorrect handling of negative read sizes in HTTPResponse.read() (GH-128270) (#129396)
gh-112064: Fix incorrect handling of negative read sizes in `HTTPResponse.read()` (GH-128270)

The parameter `amt` of `HTTPResponse.read()`, which could be a negative integer,
has not been handled before and led to waiting for the connection to close
for `keep-alive connections`. Now, this has been fixed, and passing negative values
to `HTTPResponse().read()` works the same as passing `None` value.
(cherry picked from commit 4d0d24f6e3)

Co-authored-by: Yury Manushkin <manushkin@gmail.com>
2025-01-28 11:54:27 +00:00
Miss Islington (bot)
ea143e67b3
[3.12] gh-85046: Document errno constants (GH-126420) (#129384)
(cherry picked from commit 1c3bb200da)

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
2025-01-28 00:20:13 +00:00
Miss Islington (bot)
2df8b395b0
[3.12] gh-119511: Fix a potential denial of service in imaplib (GH-119514) (GH-129356)
gh-119511: Fix a potential denial of service in imaplib (GH-119514)

The IMAP4 client could consume an arbitrary amount of memory when trying
to connect to a malicious server, because it read a "literal" data with a
single read(size) call, and BufferedReader.read() allocates the bytes
object of the specified size before reading. Now the IMAP4 client reads data
by chunks, therefore the amount of used memory is limited by the
amount of the data actually been sent by the server.
(cherry picked from commit 735f25c5e3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-01-27 14:06:14 -08:00