Commit graph

119082 commits

Author SHA1 Message Date
Miss Islington (bot)
e46fd7257a
[3.12] gh-117597: Clarify exception handling in the tutorial (GH-117681) (#117700)
(cherry picked from commit a05068db0c)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
2024-04-09 21:06:35 +00:00
Miss Islington (bot)
af034dd150
[3.12] gh-117534: Add checking for input parameter in iso_to_ymd (GH-117543) (#117689)
gh-117534: Add checking for input parameter in iso_to_ymd (GH-117543)

Moves the validation for invalid years in the C implementation of the `datetime` module into a common location between `fromisoformat` and `fromisocalendar`, which improves the error message and fixes a failed assertion when parsing invalid ISO 8601 years using one of the "ISO weeks" formats.

---------

(cherry picked from commit d5f1139c79)

Co-authored-by: Vlad4896 <166005126+Vlad4896@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2024-04-09 18:17:21 +00:00
Thomas Wouters
26831278d8 Post 3.12.3 2024-04-09 17:25:54 +02:00
Thomas Wouters
f6650f9ad7 Python 3.12.3 2024-04-09 10:09:14 +02:00
Miss Islington (bot)
ced359855e
[3.12] gh-111726: Explicitly close database connections in sqlite3 doctests (GH-111730) (#117630)
(cherry picked from commit a7702663e3)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-04-08 11:59:02 +02:00
Alex Waygood
3734bee764
[3.12] Fix reference in code.rs (#117615) (#117628)
Co-authored-by: Anita Hammer <166057949+anitahammer@users.noreply.github.com>
Fix reference in code.rst (#117615)
2024-04-08 09:18:44 +00:00
Miss Islington (bot)
7374d65376
[3.12] gh-111726: Remove some doctests from sqlite3 docs (GH-117623) (#117625)
* remove load extension doctest since we cannot skip it conditionally
* remove sys.unraisablehook example; using unraisable hooks is not "an
  improved debug experience"

(cherry picked from commit e338e1a4ec)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-04-08 08:18:55 +00:00
Miss Islington (bot)
e9a49c273e
[3.12] gh-111726: Cleanup test files after running sqlite3 doctest (GH-117604) (#117622)
Remove all temporary databases in a dedicated 'testcleanup' step
at the end of the file.
(cherry picked from commit a453f5ef9d)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-04-08 06:42:42 +00:00
Donghee Na
2449441242
[3.12] gh-117594: Require cpu resource to test_search_anchor_at_beginning (g… (gh-117616)
gh-117594: Require cpu resource to test_search_anchor_at_beginning (gh-117595)

(cherry picked from commit 784623c63c)
2024-04-08 00:23:55 +00:00
Miss Islington (bot)
558b517bb5
[3.12] gh-117074: Update Traversable.joinpath docs to the 3.11+ protocol (GH-117113) (GH-117571)
gh-117074: Update Traversable.joinpath docs to the 3.11+ protocol (GH-117113)
(cherry picked from commit e569f9132b)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-04-05 17:33:52 +02:00
Grigoriev Semyon
a49426afaa
[3.12] gh-109120: Fix syntax error in handlinh of incorrect star expressions… (#117465)
gh-109120: Fix syntax error in handlinh of incorrect star expressions (#117444)

(cherry picked from commit c97d3af239)
2024-04-04 11:22:43 -04:00
Miss Islington (bot)
663e7bc2ee
[3.12] [doc] Update logging documentation to improve grammar and elucidate an example. (GH-117541) (GH-117542)
(cherry picked from commit df912c913a)
2024-04-04 14:19:10 +01:00
Miss Islington (bot)
b5e12aa9ff
[3.12] gh-117521: Improve typing.TypeGuard docstring (GH-117522) (#117538)
(cherry picked from commit b32789ccb9)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-04-04 11:04:16 +00:00
Miss Islington (bot)
14aef56ebb
[3.12] gh-117467: Add preserving of mailbox owner on flush (GH-117510) (GH-117537)
(cherry picked from commit 3f5bcc86d0)

Co-authored-by: Tony Mountifield <tony@mountifield.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-04-04 10:55:42 +00:00
Miss Islington (bot)
eca377f203
gh-117267: Ensure DirEntry.stat().st_ctime still contains creation time during deprecation period (GH-117354)
(cherry picked from commit 985917dc8d)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-04-03 22:32:09 +00:00
Miss Islington (bot)
fad48ea181
[3.12] gh-117166: Ignore empty and temporary dirs in test_makefile (GH-117190) (GH-117367)
gh-117166: Ignore empty and temporary dirs in `test_makefile` (GH-117190)
(cherry picked from commit d9cfe7e565)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-04-03 15:32:55 +02:00
Miss Islington (bot)
06ba6c86d2
[3.12] gh-91565: Update issue tracker URL in error message. (GH-117450) (#117497)
gh-91565: Update issue tracker URL in error message. (GH-117450)

* Update issue tracker URL in commit message.

* Also update issue tracker URL in comment.
(cherry picked from commit 8987a5c809)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2024-04-03 11:10:12 +02:00
Miss Islington (bot)
75b3139b53
[3.12] gh-115538: Use pathlib to compare prefixes in test_venv (GH-117076)
gh-115538: Use pathlib to compare prefixes in test_venv (GH-117076)
(cherry picked from commit 52f5b7f9e0)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2024-04-02 13:29:32 +00:00
Miss Islington (bot)
52f1fb6f7d
[3.12] Link to the Python type system specification (GH-117400) (#117448)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-04-02 09:29:10 +00:00
Miss Islington (bot)
a4a8af07cf
[3.12] Docs: specify XML document name in xml.etree.elementtree example (GH-24223) (#117429)
(cherry picked from commit 9dae05ee59)

Co-authored-by: Moshe Kaplan <mosheekaplan@gmail.com>
2024-04-01 22:02:34 +02:00
Miss Islington (bot)
4a3fc49d2d
[3.12] Docs: add more links to PIPE in subprocess docs (GH-25416) (#117427)
(cherry picked from commit fc2071687b)

Co-authored-by: Matthew Davis <7035647+mdavis-xyz@users.noreply.github.com>
2024-04-01 19:56:36 +00:00
Miss Islington (bot)
87e470b039
[3.12] build(deps): bump actions/add-to-project from 0.6.0 to 1.0.0 (GH-117415) (#117420)
build(deps): bump actions/add-to-project from 0.6.0 to 1.0.0 (GH-117415)
(cherry picked from commit 3bb12e407c)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-01 12:35:55 +02:00
Miss Islington (bot)
0b23bc334c
[3.12] gh-102190: Add additional zipfile pwd= arg docstrings (gh-102195) (GH-117408)
gh-102190: Add additional zipfile `pwd=` arg docstrings (gh-102195)

This just documents the parameter that already exists.

---------

(cherry picked from commit a32d693948)

Co-authored-by: Deborah <32307299+dlwrnc@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-03-31 18:53:51 -07:00
Miss Islington (bot)
b912d2b24a
[3.12] gh-117387 Remove hash mark from introductory text (GH-117409) (#gh- 2024-03-31 21:24:28 +00:00
Victor Stinner
c80d13838d
[3.12] gh-117347: Fix test_clinic side effects (#117363) (#117365)
gh-117347: Fix test_clinic side effects (#117363)

Save/restore converters in ClinicWholeFileTest and
ClinicExternalTest.

(cherry picked from commit 35b6c4a4da)
2024-03-29 12:04:25 +01:00
Miss Islington (bot)
2a18945dc6
[3.12] Fix reversed assertRegex checks in test_ssl. (GH-117351) (#117359)
Fix reversed assertRegex checks in test_ssl. (GH-117351)
(cherry picked from commit 2e9be80c99)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-03-29 01:19:04 +00:00
Miss Islington (bot)
9f831f442c
[3.12] gh-117110: Fix subclasses of typing.Any with custom constructors (GH-117111) (#117357)
gh-117110: Fix subclasses of typing.Any with custom constructors (GH-117111)
(cherry picked from commit 8eec7ed714)

Co-authored-by: 傅立业(Chris Fu) <17433201@qq.com>
2024-03-29 00:36:14 +00:00
Christopher Chianelli
655c4255fc
[3.12] gh-117339: Use NULL instead of None for LOAD_SUPER_ATTR in dis docs (GH-117343) (GH-117345) 2024-03-29 06:27:16 +08:00
Miss Islington (bot)
1e48de61ac
[3.12] gh-114331: Skip decimal test_maxcontext_exact_arith on s390x (GH-117326) (#117327)
gh-114331: Skip decimal test_maxcontext_exact_arith on s390x (GH-117326)
(cherry picked from commit 6702d2bf6e)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-03-28 18:28:20 +01:00
Miss Islington (bot)
5a6318f2aa
[3.12] gh-117310: Remove extra DECREF on "no ciphers" error path in _ssl._SSLContext constructor (GH-117309) (GH-117317)
gh-117310: Remove extra DECREF on "no ciphers" error path in `_ssl._SSLContext` constructor (GH-117309)

Remove extra self DECREF on ssl "no ciphers" error path.

This doesn't come up in practice because nobody links against a broken
OpenSSL library that provides nothing.
(cherry picked from commit 8cb7d7ff86)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-03-28 10:04:57 -07:00
Miss Islington (bot)
552b2646b7
[3.12] gh-117178: Recover lazy loading of self-referential modules (GH-117179) (#117319)
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
2024-03-28 11:15:16 +00:00
Miss Islington (bot)
8d42c57789
[3.12] gh-99108: Update and check HACL* version information (GH-117295) (GH-117302)
gh-99108: Update and check HACL* version information (GH-117295)

(cherry picked from commit 669ef49c7d)

Co-authored-by: Seth Michael Larson <seth@python.org>
2024-03-27 22:16:19 +00:00
AN Long
17a82a1d16
[3.12] gh-104242: Enable test_is_char_device_true in pathlib test on all platform (GH-116983) (GH-117277)
(cherry picked from commit af1b0e9440)
2024-03-27 10:42:37 +02:00
Miss Islington (bot)
932194dc00
[3.12] Change links on the index page (GH-117230) (#117268)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2024-03-26 19:14:20 +00:00
AN Long
ca0793980b
[3.12] gh-115538: Use isolate mode when running venv test_multiproces… (#117264)
[3.12] gh-115538: Use isolate mode when running venv test_multiprocessing_recursion() (GH-117116)
(cherry picked from commit 4ec347760f)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-03-26 17:53:37 +01:00
Miss Islington (bot)
0b95ba0306
[3.12] pre-commit: add check-case-conflict and check-merge-conflict (GH-117259) (#117260)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-03-26 16:12:36 +02:00
Miss Islington (bot)
36b1a20851
[3.12] gh-66543: Fix mimetype.guess_type() (GH-117217) (GH-117256)
Fix parsing of the following corner cases:

* URLs with only a host name
* URLs containing a fragment
* URLs containing a query
* filenames with only a UNC sharepoint on Windows

(cherry picked from commit 9654daf793)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2024-03-26 11:43:36 +00:00
Miss Islington (bot)
54514467c2
[3.12] gh-83845: Add tests for operator module (GH-115883) (#117253)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
2024-03-26 09:37:41 +00:00
Victor Stinner
477ef9015c
[3.12] gh-83434: Sync libregrtest and test_regrtest with the main branch (#117250)
* gh-115122: Add --bisect option to regrtest (#115123)

* test.bisect_cmd now exit with code 0 on success, and code 1 on
  failure. Before, it was the opposite.
* test.bisect_cmd now runs the test worker process with
  -X faulthandler.
* regrtest RunTests: Add create_python_cmd() and bisect_cmd()
  methods.

(cherry picked from commit 1e5719a663)

* gh-115720: Show number of leaks in huntrleaks progress reports (GH-115726)

Instead of showing a dot for each iteration, show:
- '.' for zero (on negative) leaks
- number of leaks for 1-9
- 'X' if there are more leaks

This allows more rapid iteration: when bisecting, I don't need
to wait for the final report to see if the test still leaks.

Also, show the full result if there are any non-zero entries.
This shows negative entries, for the unfortunate cases where
a reference is created and cleaned up in different runs.

Test *failure* is still determined by the existing heuristic.

(cherry picked from commit af5f9d682c)

* gh-83434: Disable XML in regrtest when -R option is used (#117232)

(cherry picked from commit d52bdfb19f)

---------

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-03-26 08:04:28 +00:00
Miss Islington (bot)
1c72265a31
[3.12] gh-117187: Fix XML tests for vanilla Expat <2.6.0 (GH-117203) (GH-117244)
gh-117187: Fix XML tests for vanilla Expat <2.6.0 (GH-117203)

This fixes XML unittest fallout from the https://github.com/python/cpython/issues/115398 security fix.  When configured using `--with-system-expat` on systems with older pre 2.6.0 versions of libexpat, our unittests were failing.

* sax|etree: Simplify Expat version guard where simplifiable

Idea by Matěj Cepl

* sax|etree: Fix reparse deferral tests for vanilla Expat <2.6.0

This *does not fix* the case of distros with an older version of libexpat with the 2.6.0 feature backported as a security fix.  (Ubuntu is a known example of this with its libexpat1 2.5.0-2ubunutu0.1 package)
(cherry picked from commit 9f74e86c78)

Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
2024-03-26 02:08:23 +00:00
Gregory P. Smith
2f9caafdf4
[3.12] gh-99108: Refresh HACL*; update modules accordingly; fix namespacing (GH-117237) (GH-117243)
Pulls in a new update from https://github.com/hacl-star/hacl-star and fixes our C "namespacing" done by `Modules/_hacl/refresh.sh`.

Co-authored-by: Jonathan Protzenko <protz@microsoft.com>
2024-03-26 01:43:24 +00:00
Miss Islington (bot)
293a479950
[3.12] Sync main docs and docstring for median_grouped(). (gh-117214) (gh-117241) 2024-03-25 23:56:36 +00:00
Miss Islington (bot)
9359fdd6fa
[3.12] Add information about negative indexes to sequence datamodel doc (GH-110903) (#117238)
Co-authored by Terry Jan Reedy
(cherry picked from commit c2276176d5)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2024-03-25 22:40:28 +00:00
Miss Islington (bot)
0c334f627b
[3.12] Minor markup and grammar fixes in the statistics docs (gh-117216) (gh-117218) 2024-03-25 14:33:15 +00:00
Miss Islington (bot)
bd2c60f8c2
[3.12] gh-91227: Ignore ERROR_PORT_UNREACHABLE in proactor recvfrom() (GH-32011) (GH-117209)
(cherry picked from commit f11d0d8be8)

Co-authored-by: Erik Soma <stillusingirc@gmail.com>
2024-03-25 12:21:31 +02:00
Miss Islington (bot)
193a24bb80
[3.12] GH-115986 Docs: promote pprint.pp usage as a default (GH-116614) (#117196)
Co-authored-by: Kerim Kabirov <the.privat33r+gh@pm.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-03-24 09:14:47 -06:00
Miss Islington (bot)
4326e07a8b
[3.12] gh-101760: Improve the imaplib.IMAP4 example (GH-101764) (#117191)
Co-authored-by: LilKS <1244886+LilKS@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-03-24 10:09:08 +00:00
Carol Willing
1d0e22e500
[3.12] docs:fix over-linking in dataclasses.rst (GH-117005) (#117163)
* docs: fix over-linking in dataclasses.rst (#117005)

(cherry picked from commit 0907871d43)

* [3.12] docs: fix over-linking in dataclasses.rst (GH-117005)
(cherry picked from commit 0907871d43)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>

---------

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2024-03-22 19:12:00 +00:00
Serhiy Storchaka
f3fee231d3
[3.12] gh-117084: Fix ZIP file extraction for directory entry names with backslashes on Windows (GH-117129) (GH-117162)
(cherry picked from commit 567ab3bd15)
2024-03-22 18:35:12 +00:00
Miss Islington (bot)
135a698d5c
[3.12] [docs] Fix typo in docstring and add example to logging cookbook. (GH-117157) (GH-117159)
(cherry picked from commit 00baaa21de)
2024-03-22 17:50:02 +00:00