Commit graph

124780 commits

Author SHA1 Message Date
Miss Islington (bot)
cdafa05fd5
[3.13] gh-71679: Improve tests for repr() of bytes and bytearray (GH-138180) (GH-138183)
* Merge existing tests test_repr_str and test_to_str.
* Add more tests for non-printable and non-ASCII bytes.
* Add tests for special escape sequences ('\t\n\r').
* Add tests for slashes.
* Add more tests for quotes.
* Add tests for subclasses.
* Add test for non-ASCII class name.
* Only apply @check_bytes_warnings for str() tests.
(cherry picked from commit 0dbbf61cc2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-08-27 10:46:33 +00:00
Miss Islington (bot)
d6f7c615c0
[3.13] gh-106318: Add example for str.find() (GH-134529) (#138175)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-08-27 06:49:19 +00:00
Miss Islington (bot)
238a1ca713
[3.13] gh-137740: Clarify __del__ invocation mechanism in reference counting (GH-137741) (#138112)
gh-137740: Clarify `__del__` invocation mechanism in reference counting (GH-137741)
(cherry picked from commit 90b932e650)

Co-authored-by: Robin Narsingh Ranabhat <robinnarsingha123@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-08-26 23:43:42 +05:30
Miss Islington (bot)
0a72696f45
[3.13] enhance docs for critical sections (GH-137334) (#138168)
enhance docs for critical sections (GH-137334)
(cherry picked from commit 5ae8b97f6b)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-08-26 17:26:09 +00:00
Miss Islington (bot)
31eb3ef569
[3.13] gh-138148: Fix grammatical error in the asynchronous generator iterator term (GH-138155) (GH-138160)
gh-138148: Fix grammatical error in the `asynchronous generator iterator` term (GH-138155)
(cherry picked from commit 43b113d23d)

Co-authored-by: Krishna Chaitanya <141550576+XChaitanyaX@users.noreply.github.com>
2025-08-26 11:20:32 +00:00
Serhiy Storchaka
bad7bc49f1
[3.13] gh-137609: Update signatures of builtins in the documentation (GH-137610) (GH-138138)
Show signatures that match the actual signatures or future multisignatures
for all functions, classes and methods in the "builtins" module.
(cherry picked from commit 65fb4d11a0)
2025-08-25 12:40:09 +00:00
🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)
f75fc9a780
[3.13] Lint: Create a project-wide `.ruff.toml` settings file (GH-133124) (#137670)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-08-25 14:38:16 +03:00
Miss Islington (bot)
7e4afe0d52
[3.13] gh-138081: Fix/remove incorrect links in idlelib/HISTORY.txt (GH-138091) (#138125)
gh-138081: Fix/remove incorrect links in `idlelib/HISTORY.txt` (GH-138091)
(cherry picked from commit be24ff0b57)

Co-authored-by: Yongzi Li <204532581+Yzi-Li@users.noreply.github.com>
2025-08-25 02:10:51 +00:00
Bénédikt Tran
8629d466f0
[3.13] gh-135261: bring back CI job for testing OpenSSL 1.1.1w (GH-135262) (#138110)
This partially reverts commit ad944b5e1f
by bringing back the CI job for testing OpenSSL 1.1.1w. Despite this
version being upstream EOL, the rationale for keeping it as follows:

- It most resembles other 1.1.1-work-a-like ssl APIs supported by important vendors.
- Python officially requires OpenSSL 1.1.1 or later, although OpenSSL 3.0 or later
  is recommended for cryptographic modules. Since changing the build requirements
  requires a transition period, we need to keep testing the allowed versions.
- The code base still contains calls to OpenSSL functions that are deprecated since
  OpenSSL 3.0 as well as `ifdef` blocks constrained to OpenSSL 1.1.1.

(cherry picked from commit 96b7a2eba4)
2025-08-24 09:47:09 +00:00
Serhiy Storchaka
59068dfcf4
[3.13] gh-137986: Fix and improve the csv functions docstrings (GH-137987) (GH-138108)
The csv.register_dialect() docstring no longer imply that it returns a
dialect.
All functions have now signatures.
(cherry picked from commit aa1dbd4dde)

Co-authored-by: maurycy <5383+maurycy@users.noreply.github.com>
2025-08-24 08:37:41 +00:00
Bénédikt Tran
f12e7cb8b2
[3.13] gh-136134: smtplib: fix CRAM-MD5 on FIPS-only environments (GH-136623) (#138087)
(cherry picked from commit 766614f88a)
(cherry picked from commit ab1bef8ad2)
2025-08-23 14:27:47 +02:00
Bénédikt Tran
3afc263c41
[3.13] gh-136134: imaplib: fix CRAM-MD5 on FIPS-only environments (GH-136615) (#138055)
(cherry picked from commit 4519b8acb5)
2025-08-23 13:01:36 +02:00
Miss Islington (bot)
b9179c354b
[3.13] gh-137754: Fix import of zoneinfo if _datetime is not available (GH-137845) (GH-138085)
Both modules should use the Python implementation in that case.
(cherry picked from commit 6620ef0ff6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-08-23 09:33:58 +00:00
Miss Islington (bot)
57b5baf3f9
[3.13] gh-133125: Clarify ZipInfo.date_time attribute documentation (GH-136082) (#138076)
gh-133125: Clarify ZipInfo.date_time attribute documentation (GH-136082)

Specifically, clarify that ZipInfo.date_time pulls the datetime information from the central directory, and that times are interpreted as local time.
(cherry picked from commit 282e88506b)

Co-authored-by: Kentaro Jay Takahashi <64148935+KentaroJay@users.noreply.github.com>
Co-authored-by: Emma Smith <emma@emmatyping.dev>
2025-08-22 17:01:37 -07:00
Miss Islington (bot)
2aeae241ca
[3.13] gh-91116: Add hyperlink from sys.settrace to frame objects (GH-138062) (GH-138069)
gh-91116: Add hyperlink from `sys.settrace` to frame objects (GH-138062)
(cherry picked from commit f278afcabf)

Co-authored-by: Krishna Chaitanya <141550576+XChaitanyaX@users.noreply.github.com>
2025-08-22 14:25:55 -04:00
Miss Islington (bot)
ab8ffc482e
[3.13] gh-135386: Skip readonly tests for the root user (GH-138058) (GH-138064)
(cherry picked from commit 5b0f00e616)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-08-22 13:44:19 +00:00
Kliment Lamonov
ebccd1de88
[3.13] gh-132744: Check recursion limit in _PY_FRAME_GENERAL (GH-132746) (GH-138032) 2025-08-22 20:25:24 +08:00
Miss Islington (bot)
8f2280272d
[3.13] gh-135386: Fix "unable to open database file" errors on readonly DB (GH-135566) (GH-138057)
Add immutable=1 flag for read-only SQLite access to avoid WAL/SHM errors on readonly DB.
(cherry picked from commit c0ae92b7c0)

Co-authored-by: General_K1ng <generak1ng0@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-08-22 11:35:21 +00:00
Miss Islington (bot)
a73515e747
[3.13] gh-137973: Add a non-parallel test plan to the iOS testbed project (GH-138018) (#138039)
Modifies the iOS testbed project to add a test plan. This simplifies the iOS
test runner, as we can now use the built-in log streaming to see test results.
It also allows for some other affordances, like providing a default LLDB config,
and using a standardized mechanism for specifying test arguments.
(cherry picked from commit 2ba2287b85)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2025-08-22 14:30:58 +08:00
Bénédikt Tran
41c2c8f01c
[3.13] gh-135734: correctly handle --enable-optimizations --disable-test-modules combination (#137998) 2025-08-21 20:28:03 +02:00
Miss Islington (bot)
6587786270
[3.13] gh-138011: Clarify tutorial method object example code (GH-138014) (#138026)
x must be a MyClass instance for examples to work.

---------

(cherry picked from commit 339f5da639)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-08-21 12:40:15 -04:00
Serhiy Storchaka
c04b3de517
[3.13] gh-137477: Fix inspect.getblock() for generator expressions (GH-137488) (GH-137995)
This fixes also inspect.getsourcelines() and inspect.getsource().
(cherry picked from commit eae9d7de1c)
2025-08-20 13:43:28 +00:00
Miss Islington (bot)
47b1c5d74e
[3.13] gh-137900: Improve dataclasses frozen parameter documentation (GH-137937) (#137991)
gh-137900: Improve dataclasses frozen parameter documentation (GH-137937)
(cherry picked from commit 7685b8ada8)

Co-authored-by: Tangyuan <47830915@qq.com>
2025-08-20 13:15:39 +00:00
Miss Islington (bot)
422a317657
[3.13] Fix typo in logging docs (GH-137981) (GH-137984)
Fix typo in `logging` docs (GH-137981)
(cherry picked from commit 9b5235b62e)

Co-authored-by: Maximilian Linhoff <maximilian.linhoff@cta-observatory.org>
2025-08-20 11:13:53 +00:00
Serhiy Storchaka
511b37a602
[3.13] Update the dbm documentation (GH-137919) (GH-137963)
Unify documentation for all backends, enumerate all not implemented mapping
methods, document particularities of implemented mapping methods.
(cherry picked from commit 8700404f86)
2025-08-19 20:39:08 +03:00
Miss Islington (bot)
8aabea7a0e
[3.13] [docs] fix grammar in ssl.SSLContect.sslsocket_class docs (GH-137935) (#137951)
[docs] fix grammar in ssl.SSLContect.sslsocket_class docs (GH-137935)

---------
(cherry picked from commit 379161dd51)

Co-authored-by: PrinceNaroliya <naroliyaprince@gmail.com>
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2025-08-19 14:22:42 +02:00
Miss Islington (bot)
8ce1698ebf
[3.13] gh-127859: Fixed documentation for call_later and call_at for early wakeup in asyncio (GH-137859) (#137907)
Co-authored-by: Bar Harel <bzvi7919@gmail.com>
2025-08-19 14:27:30 +03:00
Miss Islington (bot)
b3725651a2
[3.13] gh-134869: Fix Ctrl+C corrupts REPL autocomplete (GH-134929) (#137925)
gh-134869: Fix Ctrl+C corrupts REPL  autocomplete (GH-134929)
(cherry picked from commit 8750e5ecfc)

Co-authored-by: ggqlq <124190229+ggqlq@users.noreply.github.com>
2025-08-18 22:21:26 +01:00
Miss Islington (bot)
d1882577a3
[3.13] gh-44538: Mention nested classes/functions in doctest docs (GH-137870) (GH-137917)
gh-44538: Mention nested classes/functions in doctest docs (GH-137870)
(cherry picked from commit 138ed6db9f)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2025-08-18 15:05:12 +00:00
Miss Islington (bot)
fc2e84feb1
[3.13] gh-123085: _compile_importlib: Avoid copying sources before compilation (GH-124131) (#137914)
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-08-18 13:55:44 +00:00
Miss Islington (bot)
1a10c47fae
[3.13] gh-135862: add C contiguous one-dimensional buffer requirement to asyncio.StreamWriter docs (GH-137910) (#137913)
gh-135862: add C contiguous one-dimensional buffer requirement to `asyncio.StreamWriter` docs (GH-137910)
(cherry picked from commit 1c3950abc1)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-08-18 13:13:19 +00:00
Adam Turner
135e8343a4
[3.13] gh-131885: Use positional-only markers for the `decimal` module (GH-131990) (#137904)
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
2025-08-18 11:59:24 +00:00
Gregory P. Smith
9face218e7
[3.13] gh-87135: Hang non-main threads that attempt to acquire the GIL during finalization (GH-105805) (GH-137827)
* [3.13] gh-87135: Hang non-main threads that attempt to acquire the GIL during finalization (GH-105805)

Instead of surprise crashes and memory corruption, we now hang threads that attempt to re-enter the Python interpreter after Python runtime finalization has started. These are typically daemon threads (our long standing mis-feature) but could also be threads spawned by extension modules that then try to call into Python. This marks the `PyThread_exit_thread` public C API as deprecated as there is no plausible safe way to accomplish that on any supported platform in the face of things like C++ code with finalizers anywhere on a thread's stack. Doing this was the least bad option.

(cherry picked from commit 8cc5aa47ee)

Co-authored-by: Jeremy Maitin-Shepard <jeremy@jeremyms.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>

* state "3.13.7 and earlier"
* backport: do not add the deprecated marker
* fix Py_IsFinalizing doc ref

---------

Co-authored-by: Jeremy Maitin-Shepard <jeremy@jeremyms.com>
2025-08-17 09:08:14 -07:00
Miss Islington (bot)
f2b7954ce0
[3.13] gh-135661: Fix parsing unterminated bogus comments in HTMLParser (GH-137873) (GH-137875)
Bogus comments that start with "<![CDATA[" should not include the starting "!"
in its value.
(cherry picked from commit 7636a66635)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-08-17 10:59:24 +00:00
Miss Islington (bot)
133f7bd22b
[3.13] gh-137846: Add missing 'be' to profile doc. (GH-137856) (#137858)
gh-137846: Add missing 'be' to profile doc. (GH-137856)

Insert 'be' into 'will interpreted'.
(cherry picked from commit 3663b2ad54)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-08-16 10:56:21 -04:00
Miss Islington (bot)
33a3f5e458
[3.13] gh-90483: fix docs of SubprocessTransport.get_pipe_transport (GH-137852) (#137854)
gh-90483: fix docs of `SubprocessTransport.get_pipe_transport ` (GH-137852)
(cherry picked from commit 038a6e3b95)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-08-16 11:17:55 +00:00
Miss Islington (bot)
7f18b0e45d
[3.13] gh-101359: clarify docs for asyncio.Event.clear (GH-137849) (#137851)
gh-101359: clarify docs for `asyncio.Event.clear` (GH-137849)
(cherry picked from commit 4b2dbe8e0a)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-08-16 16:29:26 +05:30
Miss Islington (bot)
8d6e1075da
[3.13] gh-131178: Add tests for site command-line interface (GH-133582) (GH-137833)
gh-131178: Add tests for `site` command-line interface  (GH-133582)
(cherry picked from commit 03f5519d77)

Co-authored-by: ggqlq <124190229+ggqlq@users.noreply.github.com>
2025-08-15 18:22:46 +00:00
Miss Islington (bot)
83e4b43626
[3.13] gh-137777: Disband the 'Program Frameworks' chapter (GH-137796) (#137831)
Co-authored-by: rimchoi <hyerimc858@gmail.com>
2025-08-15 17:50:47 +00:00
Jason R. Coombs
0607fdd56c
[3.13] gh-123085: Fix issue in inferred caller when resource package has no source (GH-123102) (#124024) 2025-08-15 14:21:16 +00:00
Miss Islington (bot)
2c614a8264
[3.13] Mention the "context manager" keyword in concurrent.futures documentation (GH-130976) (#137811)
Mention the "context manager" keyword in concurrent.futures documentation (GH-130976)
(cherry picked from commit 095bc775ec)

Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
2025-08-15 19:41:04 +05:30
Miss Islington (bot)
929a77cfce
[3.13] gh-137760: Update REPL constants documentation (gh-137798) (gh-137823)
gh-137760: Update REPL constants documentation (gh-137798)
(cherry picked from commit d6719c6be6)

Co-authored-by: Chaemin-Lim <antraxmin@naver.com>
2025-08-15 13:59:18 +00:00
adam j hartz
5131b8fe7e
[3.13] gh-137576: Fix for Basic REPL showing incorrect code in tracebacks with PYTHONSTARTUP (GH-137625) (#137778)
(cherry picked from commit 04f8ef663b)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2025-08-15 12:10:39 +03:00
Miss Islington (bot)
785b396719
[3.13] gh-134262: Catch both URLError and ConnectionError in retries (GH-135365) (#137779)
gh-134262: Catch both URLError and ConnectionError in retries (GH-135365)
(cherry picked from commit acc20a83f4)

Co-authored-by: Emma Smith <emma@emmatyping.dev>
2025-08-14 12:56:42 -07:00
Miss Islington (bot)
4c29fc2b02
[3.13] gh-134262: Fix off by one errors in download retry functions (GH-137775)
(cherry picked from commit e64395e8eb)

Co-authored-by: Emma Smith <emma@emmatyping.dev>
2025-08-14 19:01:13 +00:00
Miss Islington (bot)
a33596765b
[3.13] gh-135661: Fix CDATA section parsing in HTMLParser (GH-135665) (GH-137773)
"] ]>" and "]] >" no longer end the CDATA section.

Make CDATA section parsing  context depending.
Add private method HTMLParser._set_support_cdata() to change the context.
If called with True, "<[CDATA[" starts a CDATA section which ends with "]]>".
If called with False, "<[CDATA[" starts a bogus comments which ends with ">".
(cherry picked from commit 0cbbfc4621)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-08-14 21:44:16 +03:00
Thomas Wouters
46b2577b42 Merge branch '3.13' of https://github.com/python/cpython into 3.13 2025-08-14 20:13:46 +02:00
Thomas Wouters
470091376e Post 3.13.7 2025-08-14 20:13:25 +02:00
Miss Islington (bot)
e0ae4cbfc7
[3.13] gh-109975: Indicate the minimum version for PyREPL in the tutorial (GH-136046) (#137767)
Co-authored-by: Konstantin Morenko <konstantin-morenko@users.noreply.github.com>
2025-08-14 17:08:14 +01:00
Thomas Wouters
bcee1c3221 Python 3.13.7 2025-08-14 13:12:11 +02:00