Commit Graph

53387 Commits

Author SHA1 Message Date
Andrew Svetlov 7b0543ebe6
[3.13] gh-128308: pass `**kwargs` to asyncio task_factory (GH-128768) (#130084)
* [3.13] gh-128308: pass `**kwargs` to asyncio task_factory (GH-128768)
(cherry picked from commit 38a9956876)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>


---------

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-02-14 22:04:17 +05:30
Miss Islington (bot) a76aff6ea4
[3.13] gh-129693: Suppress `SyntaxWarning` in test_fstring (GH-129830) (#130068)
gh-129693: Suppress `SyntaxWarning` in test_fstring (GH-129830)

Suppress SyntaxWarning in test_fstring
(cherry picked from commit 2dd018848c)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-02-13 02:03:00 +00:00
Pablo Galindo Salgado 8d1d36b742
[3.13] gh-116042: Fix location for SyntaxErrors of invalid escapes in the tokenizer (GH-116049) (#130066)
(cherry picked from commit 56eda25633)
(cherry picked from commit 369704b428)
2025-02-13 01:49:25 +00:00
Sam Gross ee12a3482d
[3.13] gh-129967: Fix race condition in `repr(set)` (gh-129978) (gh-130020)
The call to `PySequence_List()` could temporarily unlock and relock the
set, allowing the items to be cleared and return the incorrect
notation `{}` for a empty set (it should be `set()`).

(cherry picked from commit a7427f2db9)

Co-authored-by: T. Wouters <thomas@python.org>
2025-02-11 18:18:12 -05:00
Miss Islington (bot) e5c522e895
[3.13] gh-97850: Update the deprecation warning of `importlib.abc.Loader.load_module` (GH-129855) (GH-130013)
gh-97850: Update the deprecation warning of `importlib.abc.Loader.load_module` (GH-129855)
(cherry picked from commit aa81a6f6e4)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-02-11 19:28:25 +00:00
Miss Islington (bot) fd665d5f09
[3.13] gh-127712: Fix `secure` argument of `logging.handlers.SMTPHandler` (GH-127726) (GH-129955)
(cherry picked from commit d7672e5d5a)
2025-02-10 14:30:31 +00:00
Miss Islington (bot) 7df30bbc49
[3.13] gh-129583: update bundled pip to 25.0.1 (GH-129909) (#129946)
Co-authored-by: Stéphane Bidoul <stephane.bidoul@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2025-02-10 14:03:40 +02:00
Miss Islington (bot) cef406bbc3
[3.13] gh-126554: correct detection of `gcc` for `TestNullDlsym.test_null_dlsym` (GH-129872) (#129944)
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:16:28 +00:00
Miss Islington (bot) dee4f2c2a2
[3.13] gh-68400: Remove outdated 2.7 comment (GH-129919) (#129937)
(cherry picked from commit d9bf3c16e5)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-02-10 05:16:09 +00:00
Erlend E. Aasland d6daeeeb2f
[3.13] gh-129603: Don't segfault if sqlite3.Row description is None (#129604) (#129923)
(cherry picked from commit 7e6ee50b6b)
2025-02-10 00:21:33 +00:00
Miss Islington (bot) d26c2fe7a2
[3.13] gh-129870: Skip test_dump_virtual_tables if SQLite lacks FTS4 support (GH-129913) (#129918)
(cherry picked from commit cda83cade0)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2025-02-09 21:06:16 +00:00
Miss Islington (bot) 26041daf01
[3.13] gh-129892: Doc: Remove unnecessary role directive in graphlib.py (GH-129896) (#129904)
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:47:10 +00:00
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) 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
Thomas Wouters 4f0261561a Merge branch '3.13' of https://github.com/python/cpython into 3.13 2025-02-04 20:40:10 +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
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) 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) 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) 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
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
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) 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
Miss Islington (bot) 25a3f3ac46
[3.13] remove type annotations from multiprocessing. (GH-129381) (#129470)
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 08:54:15 +00:00
Miss Islington (bot) 8b4a0d641c
[3.13] gh-125522: Fix bare except in `test_uuid` (GH-129018) (#129455)
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:23:10 +00:00
Miss Islington (bot) f502c8f6a6
[3.13] gh-118761: Improve import time of `subprocess` (GH-129427) (#129447)
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:55:24 +00:00
Miss Islington (bot) 8597be4613
[3.13] gh-129408: http: Fix typo 'RFF' to RFC' in docstring (GH-129411) (#129414)
gh-129408: http: Fix typo 'RFF' to RFC' in documentation (GH-129411)
(cherry picked from commit 7dd0a7e52e)

Co-authored-by: Samuel GIFFARD <samuel@giffard.co>
2025-01-28 18:48:51 +00:00
Miss Islington (bot) bf6c256a64
[3.13] gh-112064: Fix incorrect handling of negative read sizes in `HTTPResponse.read()` (GH-128270) (#129395)
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 12:00:54 +00:00
Miss Islington (bot) 5829f7bf70
[3.13] gh-119511: Fix a potential denial of service in imaplib (GH-119514) (GH-129355)
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:05:59 -08:00
Miss Islington (bot) c7f9e7446c
[3.13] gh-129061: Fix `FORCE_COLOR` and `NO_COLOR` when empty strings (GH-129140) (#129360)
gh-129061: Fix `FORCE_COLOR` and `NO_COLOR` when empty strings (GH-129140)
(cherry picked from commit 9546fe2ef2)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-01-27 14:48:05 +00:00
Miss Islington (bot) 6e887411b6
[3.13] gh-123987: Fix NotADirectoryError in NamespaceReader when sentinel present (GH-124018) (#129319)
gh-123987: Fix NotADirectoryError in NamespaceReader when sentinel present (GH-124018)
(cherry picked from commit b543b32eff)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2025-01-26 12:04:09 -05:00
Terry Jan Reedy 1499f66c4c
[3.13] gh-71339: Use new assertion methods in test_idle (#129314)
Revise 10 tests in 7 files, with 1 test split into 2.
(cherry picked from commit dbb25ce)
2025-01-26 09:42:08 +00:00
Miss Islington (bot) e07a6fe7c3
[3.13] Improve tests for _colorize.can_colorize() (GH-129234) (GH-129265)
(cherry picked from commit 7907203bc0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-01-24 17:00:54 +00:00
Miss Islington (bot) 75ec6caa48
[3.13] gh-128479: fix asyncio staggered race leaking tasks, and logging unhandled exception.append exception (GH-128475) (#129227)
gh-128479: fix asyncio staggered race leaking tasks, and logging unhandled exception.append exception (GH-128475)
(cherry picked from commit ec91e1c276)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-01-23 22:16:02 +01:00
Miss Islington (bot) 5c102a12a1
[3.13] gh-118878: Pyrepl: show completions menu below the current line (GH-118939) (#129161)
gh-118878: Pyrepl: show completions menu below the current line (GH-118939)

(cherry picked from commit 29caec62ee)

Co-authored-by: Daniel Hollas <daniel.hollas@bristol.ac.uk>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2025-01-23 22:15:27 +01:00
Miss Islington (bot) 52ccf264df
[3.13] gh-128330: Terminal control characters should be restored on repl exit (GH-128331) (#129233)
gh-128330: Terminal control characters should be restored on repl exit (GH-128331)
(cherry picked from commit 0b15d9c0d2)

Co-authored-by: Andy Fiddaman <andy@omnios.org>
2025-01-23 17:55:28 +00:00
Victor Stinner e3b3e01d6a
[3.13] gh-129185: Fix PyTraceMalloc_Untrack() at Python exit (#129191) (#129217)
gh-129185: Fix PyTraceMalloc_Untrack() at Python exit (#129191)

Support calling PyTraceMalloc_Track() and PyTraceMalloc_Untrack()
during late Python finalization.

* Call _PyTraceMalloc_Fini() later in Python finalization.
* Test also PyTraceMalloc_Untrack() without the GIL
* PyTraceMalloc_Untrack() now gets the GIL.
* Test also PyTraceMalloc_Untrack() in test_tracemalloc_track_race().

(cherry picked from commit 46c7e13c05)
2025-01-23 13:59:19 +01:00