Commit graph

116727 commits

Author SHA1 Message Date
Adam Turner
77ca2f66ea
[3.11] Docs: pin python-docs-theme to 2025.2 (#129576)
* [3.11] Pin python-docs-theme

* Use today's release

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>

---------

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-02-13 01:33:04 +00:00
Miss Islington (bot)
552ec42331
[3.11] gh-119461: Restore the testSocket VSOCK skipUnless removed by PR GH-119465 (GH-129561) (#129566)
gh-119461: Restore the testSocket VSOCK skipUnless removed by PR GH-119465 (GH-129561)

Restore the skipUnless removed by GH-119465.

This test can only pass on virtual machines, not actual machines.

actual machines see:

```
    self.cli.connect((cid, VSOCKPORT))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
OSError: [Errno 19] No such device
```

Reproduced on (Linux) Ubuntu 24.04.1 running 6.8.0-52-generic.
(cherry picked from commit e1006ce1de)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-02-13 01:32:37 +00:00
Adam Turner
2068b03973
[3.11] Docs: pin python-docs-theme to 2025.2 (#129576) 2025-02-13 01:31:11 +00:00
Victor Stinner
45db419c31
[3.11] gh-119461: Fix ThreadedVSOCKSocketStreamTest (#129171)
Fix ThreadedVSOCKSocketStreamTest: if get_cid() returns the host
address or the "any" address, use the local communication address
(loopback): VMADDR_CID_LOCAL.

On Linux 6.9, apparently, the /dev/vsock device is now available but
get_cid() returns VMADDR_CID_ANY (-1).

(cherry picked from commit e94dbe4ed8)
(cherry picked from commit c750061047)
(cherry picked from commit cbfe3023e4)
2025-01-23 22:14:08 +01:00
Miss Islington (bot)
49edb990a5
[3.11] gh-128069: brew link --overwrite tcl-tk@8 to prevent conflict with GitHub image's version (GH-128090) (#129172) 2025-01-22 12:25:24 +00:00
Miss Islington (bot)
a83a7cfff4
[3.11] gh-128874: Fix the documentation for blurb 2.0 (GH-128875) (#128879)
gh-128874: Fix the documentation for blurb 2.0 (GH-128875)
(cherry picked from commit 40a4d88a14)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-01-21 19:26:25 +00:00
Petr Viktorin
f0895aa9c1
[3.11] gh-121277: Allow .. versionadded:: next in docs (GH-121278) (#124718) (#127827)
* [3.11] gh-121277: Allow `.. versionadded:: next` in docs (GH-121278) (#124718)

Make `versionchanged:: next`` expand to current (unreleased) version.

When a new CPython release is cut, the release manager will replace
all such occurences of "next" with the just-released version.
(See the issue for release-tools and devguide PRs.)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
(cherry picked from commit 7d24ea9db3)

gh-121277: Raise nice error on `next` as second argument to deprecated-removed (GH-124623)

(cherry-picked from e349f73a5a)

* Import VersionChange

sphinx.domains.changeset.VersionChange exists at least since Sphinx 2.1,
according to: https://www.sphinx-doc.org/en/master/extdev/deprecated.html

* Get config from env

* Use version, not arguments directly
2024-12-11 14:58:46 +00:00
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