Commit graph

119701 commits

Author SHA1 Message Date
Thomas Wouters
ff3bc82f7c Python 3.12.5 2024-08-06 21:08:49 +02:00
Miss Islington (bot)
b895f1804f
[3.12] gh-122334: Fix test_embed failure when missing _ssl module (GH-122630) (#122648)
gh-122334: Fix test_embed failure when missing _ssl module (GH-122630)
(cherry picked from commit 50b3603751)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
Co-authored-by: Wulian233 <1055917385@qq.com>
2024-08-06 20:59:55 +02:00
Pradyun Gedam
1c4d08d73e
[3.12] gh-122744: Bump bundled pip to 24.2 (#122747)
(cherry picked from commit 5b8a6c5186)

Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2024-08-06 18:50:14 +00:00
Gregory P. Smith
b31764104e
[3.12] gh-119577: Adjust DeprecationWarning when testing element truth values in Element tree (GH-119762) (#120190)
gh-119577: Adjust DeprecationWarning when testing element truth values in ElementTree (GH-119762)

Adjust DeprecationWarning when testing element truth values in
ElementTree, we're planning to go with the more natural True return
rather than a disruptive harder to code around exception raise, and are
deferring the behavior change for a few more releases.

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2024-08-06 17:20:06 +00:00
Christopher Chianelli
e970431f13
[3.12] gh-117270: Add missed change to COMPARE_OP from 3.12 to dis documentation (GH-117272) (#117274) 2024-08-06 19:19:44 +02:00
Miss Islington (bot)
81bed0fe8a
[3.12] gh-120104: IDLE: Fix padding in config and search dialogs (GH-120107) (#122741)
(cherry picked from commit 4b66b6b7d6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-08-06 17:07:35 +00:00
Petr Viktorin
4766d1200f
[3.12] gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233) (#122599)
* gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233)

- Encode header parts that contain newlines

Per RFC 2047:

> [...] these encoding schemes allow the
> encoding of arbitrary octet values, mail readers that implement this
> decoding should also ensure that display of the decoded data on the
> recipient's terminal will not cause unwanted side-effects

It seems that the "quoted-word" scheme is a valid way to include
a newline character in a header value, just like we already allow
undecodable bytes or control characters.
They do need to be properly quoted when serialized to text, though.

- Verify that email headers are well-formed

This should fail for custom fold() implementations that aren't careful
about newlines.

Co-authored-by: Bas Bloemsaat <bas@bloemsaat.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 0976339818)

* Document changes as made in 3.12.5
2024-08-06 19:07:19 +02:00
Gregory P. Smith
01db0e404d
[3.12] gh-122573: Require Python 3.10 or newer for Windows builds (GH-122574) (#122677)
gh-122573: Require Python 3.10 or newer for Windows builds (GH-122574)

Match statements in tooling require a more recent Python. `Tools/cases_generator/*.py`

Co-authored-by: Jonathan Protzenko <protz@microsoft.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-08-06 18:53:32 +02:00
Miss Islington (bot)
70636659f0
[3.12] gh-83505: Add markdown mimetype mapping (GH-17995) (#118594)
gh-83505: Add markdown mimetype mapping (GH-17995)
(cherry picked from commit b6f0ab5b1c)

Co-authored-by: Ryan Batchelder <ryanbatch@gmail.com>
2024-08-06 10:05:18 -04:00
Miss Islington (bot)
be88b3b996
[3.12] Fix syntax in generate_re_casefix.py (GH-122699) (#122722)
This was broken in gh-97963.
(cherry picked from commit b72c748d7f)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-08-06 06:42:27 +00:00
Sergey B Kirpichev
2ff41583fd
[3.12] gh-122613: Document PyLong_GetInfo() (part of Limited API) (GH-122280) (#122644)
[3.12] gh-122613: Document PyLong_GetInfo() (part of Limited API) (GH-GH-122280)
(cherry picked from commit d91ac525ef)
2024-08-05 20:11:42 +02:00
Miss Islington (bot)
8f19be47b6
[3.12] gh-121367: [doc] BUILD_TUPLE arg can be 0 (GH-122663) (#122684)
gh-121367: [doc] BUILD_TUPLE arg can be 0 (GH-122663)
(cherry picked from commit 1422500d02)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-08-05 09:24:22 +00:00
Miss Islington (bot)
4d6b7b74a3
[3.12] Add 3.13 and remove 3.7 in Azure Pipelines (GH-122670) (#122672)
Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
2024-08-04 17:16:45 +00:00
Miss Islington (bot)
f7ae2c1f2a
[3.12] gh-122661: Remove GNU make-specific directive from Doc/Makefile (GH-122662) (#122669)
Co-authored-by: Libor Martínek <libas@acco.cz>
2024-08-04 17:24:57 +03:00
Miss Islington (bot)
62f224a9ad
[3.12] gh-122623: Improve c-api/bytearray.rst with error handling info (GH-122624) (#122659)
gh-122623: Improve `c-api/bytearray.rst` with error handling info (GH-122624)
(cherry picked from commit 151934a324)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-08-03 22:02:24 +00:00
Miss Islington (bot)
8f1b385ad6
[3.12] GH-121970: Fix `gettext` for audit events (GH-122651) (#122654)
GH-121970: Fix ``gettext`` for audit events (GH-122651)
(cherry picked from commit 95f5c89b54)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-03 16:47:43 +00:00
Miss Islington (bot)
e2103fc216
[3.12] Doc: Grammar fix in `library/ssl.rst`, 'Verifying certificates' (GH-122646) (#122650)
Doc: Grammar fix in ``library/ssl.rst``, 'Verifying certificates' (GH-122646)
(cherry picked from commit 06eb9701a1)

Co-authored-by: scottwoodall <scott.woodall@gmail.com>
2024-08-03 13:31:12 +00:00
Miss Islington (bot)
6dd6ea033a
[3.12] Doc: Improve wording of `os.path.commonpath()` (GH-122627) (#122642)
Doc: Improve wording of ``os.path.commonpath()`` (GH-122627)
(cherry picked from commit 7a5c4103b0)

Co-authored-by: Matth-M <93771840+Matth-M@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-03 12:29:51 +01:00
neonene
6b8a9a1061
[3.12] gh-122334: Fix crash when importing ssl after re-initialization (GH-122481) (#122495)
Fix crash when importing ssl after re-initialization

The current METH_FASTCALL|METH_KEYWORDS functions in a non-builtin module can cause segfaults after restarting the main interpreter, invoking _PyArg_UnpackKeywords() with an insufficiently cleared _PyArg_Parser struct.

This patch fixes the invalidation of the static argument parsers.
2024-08-02 13:44:55 +00:00
Alex Waygood
372df19508
[3.12] Fix typos in docs (#122502) (#122605)
Co-authored-by: jianghuyiyuan <shuangcui@live.com>
Fix typos in docs, error messages and comments (#122502)
2024-08-02 11:59:34 +00:00
Miss Islington (bot)
c47943aa5e
[3.12] gh-121723: Relax constraints on queue objects for logging.handlers.QueueHandler. (GH-122154) (GH-122604)
(cherry picked from commit fb864c76cd)
2024-08-02 12:46:04 +01:00
Miss Islington (bot)
757bcfd6a6
[3.12] gh-122544: Change OS image in readthedocs.yml to ubuntu-24.04 (GH-122568) (#122594)
Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
2024-08-02 09:45:14 +03:00
Miss Islington (bot)
c654bcec3c
[3.12] Fixes typo in idlelib/idle_test/example_stub.pyi (GH-122520) (#122591)
---------
(cherry picked from commit dbdbef3668)

Co-authored-by: Jonathon Vandezande <jevandezande@gmail.com>
2024-08-01 22:01:49 -04:00
Miss Islington (bot)
fed70e0395
[3.12] gh-122384: Mark strings from Download page for translation (GH-122385) (#122554)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-08-01 09:37:18 +00:00
Sviatoslav Sydorenko (Святослав Сидоренко)
8ab6d1b561
[3.12] Move change detection to separate workflow in CI (GH-122336). (#122538) 2024-08-01 08:03:28 +03:00
Miss Islington (bot)
5df322e91a
[3.12] gh-122133: Rework pure Python socketpair tests to avoid use of importlib.reload. (GH-122493) (GH-122505)
gh-122133: Rework pure Python socketpair tests to avoid use of importlib.reload. (GH-122493)

(cherry picked from commit f071f01b7b)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-07-31 09:23:10 -07:00
Serhiy Storchaka
5377f55b4e
[3.12] gh-87320: In the code module, handle exceptions raised in sys.excepthook (GH-122456) (GH-122515)
Before, the exception caused by calling non-default sys.excepthook
in code.InteractiveInterpreter bubbled up to the caller, ending the REPL.
(cherry picked from commit bd3d31f380)

Co-authored-by: CF Bolz-Tereick <cfbolz@gmx.de>
2024-07-31 11:54:06 +00:00
Hugo van Kemenade
ef21e48cac
[3.12] Docs: bump Sphinx to 8.0 and update constraints (GH-122496) (#122500)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-31 10:49:31 +03:00
Miss Islington (bot)
efba83f986
[3.12] GH-122482: Make About IDLE direct discussion to DPO (GH-122483) (#122486)
GH-122482: Make About IDLE direct discussion to DPO (GH-122483)

Currently, idle-dev@python.org and idle-dev mailing list
serve to collect spam (90+%).  Change About IDLE to direct
discussions to discuss.python.org.  Users are already
doing so.
(cherry picked from commit 29c04dfa27)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-07-30 22:48:52 +00:00
Miss Islington (bot)
1cd57b9937
[3.12] Remove outdated note about instance methods from datamodel.rst (GH-122471) (#122480)
Remove outdated note about instance methods from datamodel.rst (GH-122471)
(cherry picked from commit c68cb8e0c9)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2024-07-30 19:48:29 +00:00
Dino Viehland
c8f5ca6810
[3.12] gh-122208: Don't delivery PyDict_EVENT_ADDED until it can't fail (#122327)
Don't delivery PyDict_EVENT_ADDED until it can't fail
2024-07-30 09:13:40 -07:00
Miss Islington (bot)
ca2275025b
[3.12] gh-121474: Add threading.Barrier parties arg sanity check. (GH-121480) (GH-122443)
(cherry picked from commit d27a53fc02)

Co-authored-by: Clinton <pygeek@users.noreply.github.com>
2024-07-30 09:12:11 +00:00
Miss Islington (bot)
9491d18975
[3.12] gh-122400: Handle ValueError in filecmp (GH-122401) (GH-122442)
(cherry picked from commit 3a9b2aae61)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-30 09:07:06 +00:00
Miss Islington (bot)
6b4abdee91
[3.12] GH-121970: Extract `audit_events` into a new extension (GH-122325) (#122435) 2024-07-30 03:55:15 +00:00
Adam Turner
dd86217b60
[3.12] GH-122085: Use include files for C API deprecations (GH-109843) (#122423)
(cherry picked from commit 76bdfa4cd0)
2024-07-30 03:40:18 +00:00
Miss Islington (bot)
220e31adea
[3.12] gh-122133: Authenticate socket connection for socket.socketpair() fallback (GH-122134) (GH-122425)
Authenticate socket connection for `socket.socketpair()` fallback when the platform does not have a native `socketpair` C API.  We authenticate in-process using `getsocketname` and `getpeername` (thanks to Nathaniel J Smith for that suggestion).

(cherry picked from commit 78df1043db)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-07-29 22:02:20 +00:00
Miss Islington (bot)
bad84975ff
[3.12] gh-122311: Fix a refleak in pickle (GH-122411) (GH-122416)
(cherry picked from commit 68840e91ac)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-07-29 19:10:46 +00:00
Serhiy Storchaka
e6878fc3c8
Revert "[3.12] gh-120713: Normalize year with century for datetime.strftime (GH-120820) (GH-121145)" (GH-122409)
This reverts commit 027902b56f.
2024-07-29 21:55:12 +03:00
Eric Snow
5bd2ea2b94
[3.12] gh-117482: Fix the Slot Wrapper Inheritance Tests (gh-122250)
The tests were only checking cases where the slot wrapper was present in the initial case.  They were missing when the slot wrapper was added in the additional initializations.  This fixes that.

(cherry-picked from commit 490e0ad83a, AKA gh-122248)
2024-07-29 10:25:17 -06:00
Kirill Podoprigora
e29910447b
[3.12] gh-122292: Split up `Lib/test/test_ast.py` into a couple of … (#122395)
[3.12] gh-122292: Split up ``Lib/test/test_ast.py`` into a couple of files (GH-122293)
(cherry picked from commit 9187484dd9)
2024-07-29 16:17:38 +02:00
Miss Islington (bot)
a3076c734d
[3.12] gh-122311: Fix some error messages in pickle (GH-122386) (GH-122388)
(cherry picked from commit 3b034d26eb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-07-29 12:27:34 +03:00
Serhiy Storchaka
ecc97cb432
[3.12] gh-122311: Add more tests for pickle (GH-122376) (GH-122378)
(cherry picked from commit bc93923a2d)
2024-07-28 09:04:50 +00:00
Miss Islington (bot)
ccb4e3ba7e
[3.12] gh-122085: Create dedicated page for deprecations (GH-122352) (#122375)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-28 08:09:20 +00:00
Pablo Galindo Salgado
ca3486cb1e
[3.12] gh-122300: Preserve AST nodes for format specifiers with single elements (GH-122308) (#122363)
(cherry picked from commit db2d8b6db1)
2024-07-27 19:20:28 +00:00
Barney Gale
8205c16c7c
[3.12] GH-121462: pathlib docs: improve table of corresponding os/os.path functions (GH-121465) (#122360)
Re-order table of corresponding functions with the following priorities:

1. Pure functionality is at the top
2. `os.path` functions are shown before `os` functions
3. Similar functionality is kept together
4. Functionality follows docs order where possible

Add a few missed correspondences:

- `os.path.isjunction` and `Path.is_junction`
- `os.path.ismount` and `Path.is_mount`
- `os.lstat()` and `Path.lstat()`
- `os.lchmod()` and `Path.lchmod()`

Also add footnotes describing a few differences.

(cherry picked from commit cbac8a3888)
2024-07-27 17:13:20 +00:00
Miss Islington (bot)
0f83b8f306
[3.12] gh-122044: Don't error during gitignore filtering with no files (GH-122045) (#122354)
Co-authored-by: Seth Michael Larson <seth@python.org>
2024-07-27 14:27:34 +00:00
Hugo van Kemenade
fb2826a6b7
[3.12] gh-122085: Use include files for whatsnew/3.14.rst deprecations (GH-122242) (#122351) 2024-07-27 14:42:51 +03:00
Miss Islington (bot)
2e37d67db2
[3.12] gh-122170: Handle ValueError raised by os.stat() in linecache (GH-122176) (GH-122349)
(cherry picked from commit 7a6d4ccf0e)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-27 10:48:14 +00:00
Sviatoslav Sydorenko (Святослав Сидоренко)
a4449a1ada
[3.12] Move macOS matrix to the calling workflow (GH-121809) (#122330) 2024-07-27 12:19:59 +03:00
Miss Islington (bot)
102dc44a0a
[3.12] gh-122332: Fix missing NULL check in asyncio.Task.get_coro (GH-122338) (#122345)
gh-122332: Fix missing `NULL` check in `asyncio.Task.get_coro` (GH-122338)
(cherry picked from commit c08696286f)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2024-07-27 12:36:40 +05:30