Commit graph

119245 commits

Author SHA1 Message Date
Miss Islington (bot)
a39e01dd09
[3.12] gh-117752: Autoconf: fix PGO builds for 'make -C build' incantations (GH-117803) (#117805)
(cherry picked from commit 1ddbeae040)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-04-12 10:07:42 +00:00
Miss Islington (bot)
3f2f0cff75
[3.12] gh-117752: Autoconf: fix -fno-semantic-interposition check (GH-117789) (#117800)
Force the compiler to issue an error if the flag is not supported.
(cherry picked from commit 49fc1414b5)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-04-12 07:53:22 +00:00
Miss Islington (bot)
c64b65e3aa
[3.12] gh-117752: Autoconf: store all LLVM profile data in the build directory (GH-117790) (#117795)
This prevents spurious 'env changed' and llvm-profdata merge errors.

(cherry picked from commit 396b831850)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-04-12 05:39:14 +00:00
Miss Islington (bot)
9376a9f0d8
[3.12] gh-117233: Detect support for several hashes at hashlib build time (GH-117234) (#117767)
gh-117233: Detect support for several hashes at hashlib build time (GH-117234)

Detect libcrypto BLAKE2, Shake, SHA3, and Truncated-SHA512 support at hashlib build time

GH-GH- BLAKE2

While OpenSSL supports both "b" and "s" variants of the BLAKE2 hash
function, other cryptographic libraries may lack support for one or both
of the variants. This commit modifies `hashlib`'s C code to detect
whether or not the linked libcrypto supports each BLAKE2 variant, and
elides references to each variant's NID accordingly. In cases where the
underlying libcrypto doesn't fully support BLAKE2, CPython's
`./configure` script can be given the following flag to use CPython's
interned BLAKE2 implementation: `--with-builtin-hashlib-hashes=blake2`.

GH-GH- SHA3, Shake, & truncated SHA512.

Detect BLAKE2, SHA3, Shake, & truncated SHA512 support in the
OpenSSL-ish libcrypto library at build time.  This helps allow hashlib's
`_hashopenssl` to be used with libraries that do not to support every
algorithm that upstream OpenSSL does.  Such as AWS-LC & BoringSSL.

(cherry picked from commit b8eaad3009)

Co-authored-by: Will Childs-Klein <willck93@gmail.com>
Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
2024-04-11 18:36:31 +00:00
Miss Islington (bot)
84fb531fc2
[3.12] gh-104269: Document glob.glob duplicates when using multiple ** patterns (GH-105406) (#117757)
gh-104269: Document `glob.glob` duplicates when using multiple `**` patterns (GH-105406)
(cherry picked from commit c06be6bbb8)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2024-04-11 18:44:46 +01:00
Miss Islington (bot)
a3f1e980c3
[3.12] gh-101549: fix documentation of xml.etree.ElementInclude (GH-101550) (#117754)
Co-authored-by: Mikhail B <55960560+mbel0@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-04-11 14:53:27 +00:00
Miss Islington (bot)
a4541a6080
[3.12] Fix markup of win32_ver in platform.rst (GH-116492) (#117753)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-04-11 14:20:29 +00:00
Kirill Podoprigora
8c1c71ee38
[3.12] gh-115142: Skip test_capi.test_dict.py if _testcapi is not available (GH-117588) (GH-117718)
(cherry picked from commit dfcae4379f)
2024-04-11 16:18:28 +02:00
Miss Islington (bot)
5b681d60a6
[3.12] gh-117711: Only check for 'test/wheeldata' when it's actually used (GH-117712) (#117749)
gh-117711: Only check for 'test/wheeldata' when it's actually used (GH-117712)

It's possible to build Python with option `--with-wheel-pkg-dir`
pointing to a custom wheel directory. Don't include the directory in the test
set if the wheels are used from a different location.

(cherry picked from commit d4963871b0)

Co-authored-by: Karolina Surma <33810531+befeleme@users.noreply.github.com>
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2024-04-11 10:22:17 +00:00
Miss Islington (bot)
2a508572ab
[3.12] gh-117606: Truncate extremely long error message in test_exceptions (GH-117670) (#117745)
gh-117606: Truncate extremely long error message in `test_exceptions` (GH-117670)
(cherry picked from commit 02f1385f8a)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-04-11 07:53:26 +00:00
Miss Islington (bot)
04d07964f2
[3.12] gh-112536: Define _Py_THREAD_SANITIZER on GCC when TSan is enabled (GH-117702) (#117713)
gh-112536: Define `_Py_THREAD_SANITIZER` on GCC when TSan is enabled (GH-117702)

The `__has_feature(thread_sanitizer)` is a Clang-ism. Although new
versions of GCC implement `__has_feature`, the `defined(__has_feature)`
check still fails on GCC so we don't use that code path.
(cherry picked from commit 79eec66e3d)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-04-10 14:38:10 +00:00
Miss Islington (bot)
653ed76442
[3.12] gh-117692: Fix AttributeError in DocTestFinder on wrapped builtin_or_method (GH-117699) (#117708)
* gh-117692: Fix `AttributeError` in `DocTestFinder` on wrapped `builtin_or_method` (GH-117699)
(cherry picked from commit 4bb7d121bc)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-04-10 14:17:15 +00:00
Miss Islington (bot)
559b25fcc8
[3.12] gh-117360: Clearer wording in os.path.lexists() docs (GH-117679) (#117701)
(cherry picked from commit 73906d5c90)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Zachary Ware <zach@python.org>
2024-04-09 21:11:07 +00:00
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