Commit Graph

116720 Commits

Author SHA1 Message Date
Pablo Galindo 976c4f2a9d Post 3.11.11 2024-12-03 13:25:54 -05:00
Pablo Galindo d03b868578 Python 3.11.11 2024-12-03 12:20:40 -05:00
Miss Islington (bot) 66a01b068b
[3.11] gh-122792: Make IPv4-mapped IPv6 address properties consistent with IPv4 (GH-122793) (GH-123818)
Make IPv4-mapped IPv6 address properties consistent with IPv4.
(cherry picked from commit 76a1c5d183)

Co-authored-by: Seth Michael Larson <seth@python.org>

---------

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-12-03 17:57:10 +01:00
Seth Michael Larson 2e161e2499
[3.11] gh-126623: Update libexpat to 2.6.4, make future updates easier (GH-126792) (GH-126798)
Update libexpat to 2.6.4, make future updates easier.
(cherry picked from commit 3c99969094)
2024-12-03 17:42:23 +01:00
Hugo van Kemenade 7f71003b22
[3.11] gh-127359: Pin Tcl/Tk to 8 (8.6) for testing macOS (GH-127365) (#127407) 2024-11-30 18:38:21 +02:00
Petr Viktorin e33b6fccd3
[3.11] gh-111942: Remove an extra incref in textiowrapper_change_encoding (#126542) 2024-11-08 13:26:57 +01:00
Petr Viktorin 8c6885d636
[3.11] gh-87846: test_io: Ignore OpenWrapper in test___all__ (#126478) 2024-11-06 13:39:30 +00:00
Victor Stinner ae961ae94b
[3.11] gh-124651: Quote template strings in `venv` activation scripts (GH-124712) (GH-126185) (#126269) 2024-11-01 13:11:47 +00:00
Zachary Ware e84015f846
[3.11] gh-123418: Update CI to use fresh OpenSSL releases (GH-123675) (#123699)
* [3.11] gh-123418: Update CI to use fresh OpenSSL releases (GH-123675)

Also adds openssl/openssl GitHub URL template for newer OpenSSL downloads
(cherry picked from commit 56b00f4705)

Co-authored-by: Zachary Ware <zach@python.org>

* Adjust build_ubuntu_ssltests job to use cache for the correct OS version
2024-10-22 15:48:51 +00:00
Zachary Ware affa2a9503
[3.11] Adjust build_ubuntu_ssltests job to use cache for the correct OS version (#124484) 2024-10-22 16:05:48 +01:00
Petr Viktorin 8630002c5c
[3.11] gh-125041: test_zlib: For s390x HW acceleration, only skip checking the compressed bytes (GH-125042) (#125577)
gh-125041: test_zlib: For s390x HW acceleration, only skip checking the compressed bytes (#125042)

(cherry picked from commit cc5a225cdc)
2024-10-22 12:11:14 +01:00
Pablo Galindo 8b275e77d2 Post 3.11.10 2024-09-07 02:34:11 +01:00
Pablo Galindo 0c47759eee Python 3.11.10 2024-09-07 02:03:31 +01:00
Petr Viktorin 2e2b1b5f99
[3.11] gh-102988: Adjust version numbers in versionadded directives (#123772) 2024-09-06 14:29:04 +02:00
Petr Viktorin bc4a703a93
[3.11] [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr() (GH-111116) (#123767)
Detect email address parsing errors and return empty tuple to
indicate the parsing error (old API). Add an optional 'strict'
parameter to getaddresses() and parseaddr() functions. Patch by
Thomas Dwyer.

(cherry picked from commit 4a153a1d3b)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Thomas Dwyer <github@tomd.tel>
2024-09-06 12:46:23 +02:00
Zachary Ware 5752116ed7
[3.11] gh-123418: Update OpenSSL to 3.0.15 on Windows (GH-123673) (#123692)
(cherry picked from commit d2eafe2f48)
2024-09-05 14:28:35 +02:00
Seth Michael Larson b582d5234f
[3.11] gh-123678: Upgrade libexpat 2.6.3 (#123709)
(cherry picked from commit e6fe0ac014)
2024-09-05 14:27:22 +02:00
ChuBoning 522799a05e
[3.11]GH-112275: Fix HEAD_LOCK deadlock in child process after fork (#112336)
HEAD_LOCK is called from _PyEval_ReInitThreads->_PyThreadState_DeleteExcept before _PyRuntimeState_ReInitThreads reinit runtime->interpreters.mutex which might be locked before fork.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-09-04 19:14:59 +02:00
Miss Islington (bot) 851821d871
[3.11] gh-100117: Fix inaccuracy in documentation of the CodeObject's co_positions field. (GH-119364) (#119871)
(cherry picked from commit 015b1fdd0a)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-09-04 18:06:13 +02:00
Steve Dower 697beec04d
[3.11] gh-119690: Fixes buffer type confusion in _winapi.CreateNamedPipe audit event (#119734)
gh-119690: Fixes buffer type confusion in _winapi.CreateNamedPipe audit event
2024-09-04 18:02:48 +02:00
Jason R. Coombs fc0b8259e6
[3.11] gh-123270: Replaced SanitizedNames with a more surgical fix. (GH-123354) (#123425)
Applies changes from zipp 3.20.1 and jaraco/zippGH-124
(cherry picked from commit 2231286d78)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

* Restore the slash-prefixed paths in the malformed_paths test.
2024-09-04 17:52:54 +02:00
Miss Islington (bot) d4ac921a4b
[3.11] gh-123067: Fix quadratic complexity in parsing "-quoted cookie values with backslashes (GH-123075) (#123105)
This fixes CVE-2024-7592.
(cherry picked from commit 44e458357f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-09-04 17:50:00 +02:00
Serhiy Storchaka d0e8c100e4
[3.11] gh-67693: Fix urlunparse() and urlunsplit() for URIs with path starting with multiple slashes and no authority (GH-113563) (#119025)
(cherry picked from commit e237b25a4f)
2024-09-04 17:42:58 +02:00
Łukasz Langa f7c0f09e69
[3.11] gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233) (#122608)
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.

(cherry picked from commit 0976339818)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Bas Bloemsaat <bas@bloemsaat.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-09-04 17:37:28 +02:00
Seth Michael Larson d449caf8a1
[3.11] gh-121285: Remove backtracking when parsing tarfile headers (GH-121286) (#123639)
* Remove backtracking when parsing tarfile headers
* Rewrite PAX header parsing to be stricter
* Optimize parsing of GNU extended sparse headers v0.0

(cherry picked from commit 34ddb64d08)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-09-03 15:07:13 +00:00
Jason R. Coombs 795f2597a4
[3.11] gh-122905: Sanitize names in zipfile.Path. (GH-122906) (#122925)
* gh-122905: Sanitize names in zipfile.Path. (#122906)

Ported from zipp 3.19.1; ref jaraco/zipp#119.

(cherry picked from commit 9cd0326310)

* [3.11] gh-122905: Sanitize names in zipfile.Path. (GH-122906)

Ported from zipp 3.19.1; ref jaraco/zippGH-119.
(cherry picked from commit 9cd0326310)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2024-08-20 00:28:20 +01:00
Inada Naoki 8a978a75c2
[3.11] gh-119506: fix _io.TextIOWrapper.write() write during flush (#119507) (#120314)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
fix _io.TextIOWrapper.write() write during flush (#119507)
2024-08-09 17:04:36 +00:00
Miss Islington (bot) b39636047b
[3.11] gh-114539: Clarify implicit launching of shells by subprocess (GH-117996) (#118003)
Co-authored-by: Steve Dower <steve.dower@python.org>
2024-08-09 16:57:50 +03:00
Miss Islington (bot) c5655aa6ad
[3.11] gh-122133: Rework pure Python socketpair tests to avoid use of importlib.reload. (GH-122493) (GH-122506)
(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-08-02 15:09:45 +02:00
Miss Islington (bot) 5f90abaa78
[3.11] gh-122133: Authenticate socket connection for `socket.socketpair()` fallback (GH-122134) (#122426)
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-30 14:43:45 +02:00
Łukasz Langa d542a9be51
[3.11] gh-121957: Emit audit events for python -i and python -m asyncio (GH-122118) 2024-07-22 13:44:55 +02:00
Miss Islington (bot) 1b0e63c81b
[3.11] gh-112346: Document the OS byte in `gzip.compress` output change in 3.11 (GH-120480) (#120614) 2024-06-17 19:01:59 +01:00
Steve Dower 35c799d791
[3.11] gh-118486: Support mkdir(mode=0o700) on Windows (GH-118488) (GH-118739) 2024-05-24 02:13:18 +02:00
Serhiy Storchaka 4762b36540
[3.11] gh-118643: Fix AttributeError in the email module (GH-119099) (#119393)
Fix regression introduced in gh-100884: AttributeError when re-fold a long
address list.

Also fix more cases of incorrect encoding of the address separator in the
address list missed in gh-100884.
(cherry picked from commit 858b9e85fc)
2024-05-23 13:09:03 +01:00
Petr Viktorin ba431579ef
[3.11] gh-113171: gh-65056: Fix "private" (non-global) IP address ranges (GH-113179) (GH-113186) (GH-118177) (#118227) 2024-04-25 13:45:48 +01:00
Seth Michael Larson 8133285c13
[3.11] gh-116741: Upgrade libexpat to 2.6.2 (GH-117296) (#118185)
Upgrade libexpat to 2.6.2
(cherry picked from commit c9829eec08)
2024-04-23 12:28:50 -07:00
Grigoriev Semyon 3bc0d2b851
[3.11] gh-109120: Fix syntax error in handlinh of incorrect star expressions… (#117464)
gh-109120: Fix syntax error in handlinh of incorrect star expressions (#117444)

(cherry picked from commit c97d3af239)
2024-04-03 11:37:39 +01:00
Pablo Galindo cd12e6c779 Merge remote-tracking branch 'upstream/3.11' into 3.11 2024-04-02 14:38:17 +01:00
Pablo Galindo 9a40444a76 Post 3.11.9 2024-04-02 14:37:54 +01:00
Miss Islington (bot) 38bcbb22f9
[3.11] 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:31:08 +00:00
Pablo Galindo de54cf5be3 Python 3.11.9 2024-04-02 09:25:04 +01:00
Miss Islington (bot) 5b547de1f7
[3.11] Docs: specify XML document name in xml.etree.elementtree example (GH-24223) (#117430)
(cherry picked from commit 9dae05ee59)

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

Co-authored-by: Matthew Davis <7035647+mdavis-xyz@users.noreply.github.com>
2024-04-01 19:58:28 +00:00
Miss Islington (bot) 54ee038615
[3.11] [3.12] gh-117347: Fix test_clinic side effects (GH-117363) (GH-117365) (#117366)
[3.12] gh-117347: Fix test_clinic side effects (GH-117363) (GH-117365)

gh-117347: Fix test_clinic side effects (GH-117363)

Save/restore converters in ClinicWholeFileTest and
ClinicExternalTest.

(cherry picked from commit c80d13838d)

Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit 35b6c4a4da)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-03-29 11:21:56 +00:00
Miss Islington (bot) 01ab43c08a
[3.11] gh-117110: Fix subclasses of typing.Any with custom constructors (GH-117111) (#117358)
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:38:13 +00:00
Victor Stinner 8bbb12169f
[3.11] gh-114331: Skip decimal test_maxcontext_exact_arith on s390x (#117326) (#117331)
gh-114331: Skip decimal test_maxcontext_exact_arith on s390x (#117326)

Add test.support.skip_on_s390x decorator.

(cherry picked from commit 6702d2bf6e)
2024-03-28 17:53:43 +00:00
Miss Islington (bot) 65a0923c70
[3.11] gh-117310: Remove extra DECREF on "no ciphers" error path in `_ssl._SSLContext` constructor (GH-117309) (GH-117318)
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:05:19 -07:00
Miss Islington (bot) c703b7b54f
[3.11] gh-117178: Recover lazy loading of self-referential modules (GH-117179) (#117320)
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
2024-03-28 11:17:10 +00:00
Miss Islington (bot) 370a7f1e4a
[3.11] gh-104242: Enable test_is_char_device_true in pathlib test on all platform (GH-116983) (GH-117277) (GH-117280)
(cherry picked from commit 17a82a1d16)
(cherry picked from commit af1b0e9440)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2024-03-27 08:57:08 +00:00
Miss Islington (bot) d1610610c1
[3.11] Change links on the index page (GH-117230) (#117269)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2024-03-26 19:14:43 +00:00