]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
7 weeks ago[3.10] gh-118350: Fix support of elements "textarea" and "title" in HTMLParser (GH...
Serhiy Storchaka [Sat, 13 Sep 2025 20:36:51 +0000 (23:36 +0300)] 
[3.10] gh-118350: Fix support of elements "textarea" and "title" in HTMLParser (GH-135310) (GH-137783)

(cherry picked from commit 4d02f31cdd45d81b95540d9076222b709d4f2335)

Co-authored-by: Timon Viola <44016238+timonviola@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2 months ago[3.10] gh-130577: tarfile now validates archives to ensure member offsets are non...
Victor Stinner [Tue, 2 Sep 2025 18:20:27 +0000 (20:20 +0200)] 
[3.10] gh-130577: tarfile now validates archives to ensure member offsets are non-negative (GH-137027) (#137644)

gh-130577: tarfile now validates archives to ensure member offsets are non-negative (GH-137027)

(cherry picked from commit 7040aa54f14676938970e10c5f74ea93cd56aa38)

Co-authored-by: Alexander Urieles <aeurielesn@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
3 months ago[3.10] gh-135661: Fix parsing attributes with whitespaces around the "=" separator...
Miss Islington (bot) [Tue, 22 Jul 2025 09:57:56 +0000 (11:57 +0200)] 
[3.10] gh-135661: Fix parsing attributes with whitespaces around the "=" separator in HTMLParser (GH-136908) (GH-136921)

This fixes a regression introduced in GH-135930.
(cherry picked from commit dee650189497735edbc08a54edabb5b06ef1bd09)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 months ago[3.10] gh-135661: Fix parsing start and end tags in HTMLParser according to the HTML5...
Miss Islington (bot) [Sat, 12 Jul 2025 12:26:58 +0000 (14:26 +0200)] 
[3.10] gh-135661: Fix parsing start and end tags in HTMLParser according to the HTML5 standard (GH-135930) (GH-136268) (#136292)

* Whitespaces no longer accepted between `</` and the tag name.
  E.g. `</ script>` does not end the script section.

* Vertical tabulation (`\v`) and non-ASCII whitespaces no longer recognized
  as whitespaces. The only whitespaces are `\t\n\r\f `.

* Null character (U+0000) no longer ends the tag name.

* Attributes and slashes after the tag name in end tags are now ignored,
  instead of terminating after the first `>` in quoted attribute value.
  E.g. `</script/foo=">"/>`.

* Multiple slashes and whitespaces between the last attribute and closing `>`
  are now ignored in both start and end tags. E.g. `<a foo=bar/ //>`.

* Multiple `=` between attribute name and value are no longer collapsed.
  E.g. `<a foo==bar>` produces attribute "foo" with value "=bar".

* Whitespaces between the `=` separator and attribute name or value are no
  longer ignored. E.g. `<a foo =bar>` produces two attributes "foo" and
  "=bar", both with value None; `<a foo= bar>` produces two attributes:
  "foo" with value "" and "bar" with value None.

* Fix data loss after unclosed script or style tag (gh-86155).

Also backport test.support.subTests() (gh-135120).

---------
(cherry picked from commit 0243f97cbadec8d985e63b1daec5d1cbc850cae3)
(cherry picked from commit c555f889c3558a0a8cd8d8ecc2b493014b88a700)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Waylan Limberg <waylan.limberg@icloud.com>
3 months ago[3.10] gh-102555: Fix comment parsing in HTMLParser according to the HTML5 standard...
Miss Islington (bot) [Sat, 12 Jul 2025 12:24:27 +0000 (14:24 +0200)] 
[3.10] gh-102555: Fix comment parsing in HTMLParser according to the HTML5 standard (GH-135664) (GH-136275)

* "--!>" now ends the comment.
* "-- >" no longer ends the comment.
* Support abnormally ended empty comments "<-->" and "<--->".

---------
(cherry picked from commit 8ac7613dc8b8f82253d7c0e2b6ef6ed703a0a1ee)

Co-author: Kerim Kabirov <the.privat33r+gh@pm.me>

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
4 months ago[3.10] gh-135462: Fix quadratic complexity in processing special input in HTMLParser...
Serhiy Storchaka [Thu, 3 Jul 2025 21:05:53 +0000 (00:05 +0300)] 
[3.10] gh-135462: Fix quadratic complexity in processing special input in HTMLParser (GH-135464) (GH-135485)

End-of-file errors are now handled according to the HTML5 specs --
comments and declarations are automatically closed, tags are ignored.
(cherry picked from commit 6eb6c5dbfb528bd07d77b60fd71fd05d81d45c41)

4 months ago[3.10] gh-135374: Update the bundled copy of setuptools to 79.0.1 (#135398)
Łukasz Langa [Wed, 11 Jun 2025 16:10:27 +0000 (18:10 +0200)] 
[3.10] gh-135374: Update the bundled copy of setuptools to 79.0.1 (#135398)

5 months agoPost 3.10.18
Pablo Galindo [Tue, 3 Jun 2025 19:02:06 +0000 (20:02 +0100)] 
Post 3.10.18

5 months agoPython 3.10.18 v3.10.18
Pablo Galindo [Tue, 3 Jun 2025 18:22:59 +0000 (19:22 +0100)] 
Python 3.10.18

5 months ago[3.10] gh-135034: Normalize link targets in tarfile, add `os.path.realpath(strict...
T. Wouters [Tue, 3 Jun 2025 17:02:29 +0000 (19:02 +0200)] 
[3.10] gh-135034: Normalize link targets in tarfile, add `os.path.realpath(strict='allow_missing')` (GH-135037) (#135070)

Addresses CVEs 2024-12718, 2025-4138, 2025-4330, and 2025-4517.
(cherry picked from commit 3612d8f51741b11f36f8fb0494d79086bac9390a)
(cherry picked from commit c358142cab7ce621a2745262a90df967b357f61c)
(cherry picked from commit 371b4eaadcd5846d79af8f7912e4320f9cd9fae4)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Signed-off-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 months ago[3.10] gh-128840: Fix parsing long IPv6 addresses with embedded IPv4 address (GH...
Miss Islington (bot) [Tue, 3 Jun 2025 14:21:25 +0000 (16:21 +0200)] 
[3.10] gh-128840: Fix parsing long IPv6 addresses with embedded IPv4 address (GH-134836) (GH-135089)

(cherry picked from commit d83576bf48d07d5e29d5d171c4e25afb048622aa)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 months ago[3.10] gh-123409: fix `IPv6Address.reverse_pointer` for IPv4-mapped addresses (GH...
Miss Islington (bot) [Tue, 3 Jun 2025 14:01:08 +0000 (16:01 +0200)] 
[3.10] gh-123409: fix `IPv6Address.reverse_pointer` for IPv4-mapped addresses (GH-123419) (GH-135088)

Fix functionality that was broken with better textual representation for IPv4-mapped addresses (gh-87799)
(cherry picked from commit 77a2fb4bf1a1b160d6ce105508288fc77f636943)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
5 months ago[3.10] gh-128840: Limit the number of parts in IPv6 address parsing (GH-128841) ...
Miss Islington (bot) [Tue, 3 Jun 2025 13:55:27 +0000 (15:55 +0200)] 
[3.10] gh-128840: Limit the number of parts in IPv6 address parsing (GH-128841) (GH-134614)

Limit length of IP address string to 39

(cherry picked from commit 47f1161d3a2bec52b5b5e952150141709c247da2)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
5 months ago[3.10] gh-87799: Improve the textual representation of IPv4-mapped IPv6 addresses...
Miss Islington (bot) [Tue, 3 Jun 2025 13:49:38 +0000 (15:49 +0200)] 
[3.10] gh-87799: Improve the textual representation of IPv4-mapped IPv6 addresses (GH-29345) (GH-135079)

Represent IPv4-mapped IPv6 address as x:x:x:x:x:x:d.d.d.d,
where the 'x's are the hexadecimal values
of the six high-order 16-bit pieces of the address,
and the 'd's are the decimal values
of the four low-order 8-bit pieces of the address
(standard IPv4 representation).

(cherry picked from commit f22bf8e3cf899896cf587099d29290cb43aa9724)

Co-authored-by: opavliuk <40970635+opavlyuk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
5 months agoRevert "Fix a glaring error in the logic backport of posixpath."
Thomas Wouters [Tue, 3 Jun 2025 12:25:37 +0000 (14:25 +0200)] 
Revert "Fix a glaring error in the logic backport of posixpath."

This reverts commit b357f2bca375948aca03047d9209ce364e64bfa4, which was
never meant to go into 3.10.

5 months agoFix a glaring error in the logic backport of posixpath.
Thomas Wouters [Tue, 3 Jun 2025 12:12:21 +0000 (14:12 +0200)] 
Fix a glaring error in the logic backport of posixpath.

5 months ago[3.10] gh-134062: Fix hash collisions in IPv4Network and IPv6Network (GH-134063)...
Miss Islington (bot) [Mon, 2 Jun 2025 15:56:01 +0000 (17:56 +0200)] 
[3.10] gh-134062: Fix hash collisions in IPv4Network and IPv6Network (GH-134063) (GH-134480)

(cherry picked from commit f3fc0c16e08b317cb201cf1073e934e6909f1251)

Co-authored-by: Mike Salvatore <mike.s.salvatore@gmail.com>
5 months ago[3.10] gh-133767: Fix use-after-free in the unicode-escape decoder with an error...
Serhiy Storchaka [Mon, 2 Jun 2025 15:55:48 +0000 (18:55 +0300)] 
[3.10] gh-133767: Fix use-after-free in the unicode-escape decoder with an error handler (GH-129648) (GH-133944) (GH-134345)

If the error handler is used, a new bytes object is created to set as
the object attribute of UnicodeDecodeError, and that bytes object then
replaces the original data. A pointer to the decoded data will became invalid
after destroying that temporary bytes object. So we need other way to return
the first invalid escape from _PyUnicode_DecodeUnicodeEscapeInternal().

_PyBytes_DecodeEscape() does not have such issue, because it does not
use the error handlers registry, but it should be changed for compatibility
with _PyUnicode_DecodeUnicodeEscapeInternal().
(cherry picked from commit 9f69a58623bd01349a18ba0c7a9cb1dad6a51e8e)
(cherry picked from commit 6279eb8c076d89d3739a6edb393e43c7929b429d)
(cherry picked from commit a75953b347716fff694aa59a7c7c2489fa50d1f5)
(cherry picked from commit 0c33e5baedf18ebcb04bc41dff7cfc614d5ea5fe)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 months ago[3.10] gh-126500: test_ssl: Don't stop ThreadedEchoServer on OSError in ConnectionHan...
Miss Islington (bot) [Sun, 1 Jun 2025 13:30:13 +0000 (15:30 +0200)] 
[3.10] gh-126500: test_ssl: Don't stop ThreadedEchoServer on OSError in ConnectionHandler; rely on __exit__ (GH-126503) (GH-126572) (#134030)

gh-126500: test_ssl: Don't stop ThreadedEchoServer on OSError in ConnectionHandler; rely on __exit__ (GH-126503)

If `read()` in the ConnectionHandler thread raises `OSError` (except `ConnectionError`),
the ConnectionHandler shuts down the entire ThreadedEchoServer,
preventing further connections.
It also does that for `EPROTOTYPE` in `wrap_conn`.

As far as I can see, this is done to avoid the server thread getting stuck,
forgotten, in its accept loop. However, since 2011 (5b95eb90a7167285b6544b50865227c584943c9a)
the server is used as a context manager, and its `__exit__` does `stop()` and `join()`.
(I'm not sure if we *always* used `with` since that commit, but currently we do.)

Make sure that the context manager *is* used, and remove the `server.stop()`
calls from ConnectionHandler.

(cherry picked from commit c9cda1608edf7664c10f4f467e24591062c2fe62)
(cherry picked from commit aee80cd5e7c6be90c69b9aa9c09faa19b91cdccd)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
7 months agoPost 3.10.17
Pablo Galindo [Tue, 8 Apr 2025 13:27:31 +0000 (14:27 +0100)] 
Post 3.10.17

7 months agoPython 3.10.17 v3.10.17
Pablo Galindo [Tue, 8 Apr 2025 12:04:49 +0000 (13:04 +0100)] 
Python 3.10.17

7 months ago[3.10] gh-131809: Upgrade vendored expat to 2.7.1 (GH-132192) (#132241)
Seth Michael Larson [Tue, 8 Apr 2025 09:36:48 +0000 (04:36 -0500)] 
[3.10] gh-131809: Upgrade vendored expat to 2.7.1 (GH-132192) (#132241)

(cherry picked from commit c0de6500249469e6fc5b458d6afb6bad1b6755cd)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
7 months ago[3.10] gh-80222: Fix email address header folding with long quoted-string (GH-122753...
R. David Murray [Thu, 3 Apr 2025 16:58:22 +0000 (12:58 -0400)] 
[3.10] gh-80222: Fix email address header folding with long quoted-string (GH-122753) (GH-129111)

Email generators using email.policy.default could incorrectly omit the
quote ('"') characters from a quoted-string during header refolding,
leading to invalid address headers and enabling header spoofing. This
change restores the quote characters on a bare-quoted-string as the
header is refolded, and escapes backslash and quote chars in the string.
(cherry picked from commit 5aaf4168583)

Co-authored-by: Mike Edmunds <medmunds@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
7 months ago[3.10] gh-121284: Fix email address header folding with parsed encoded-word (GH-12275...
Petr Viktorin [Thu, 3 Apr 2025 16:27:20 +0000 (18:27 +0200)] 
[3.10] gh-121284: Fix email address header folding with parsed encoded-word (GH-122754) (GH-131411)

Email generators using email.policy.default may convert an RFC 2047
encoded-word to unencoded form during header refolding. In a structured
header, this could allow 'specials' chars outside a quoted-string,
leading to invalid address headers and enabling spoofing. This change
ensures a parsed encoded-word that contains specials is kept as an
encoded-word while the header is refolded.

[Better fix from @bitdancer.]

(cherry picked from commit 295b53df2aa18deb625a7da41f7e4babfe6ef34b)

Co-authored-by: Mike Edmunds <medmunds@gmail.com>
Co-authored-by: R David Murray <rdmurray@bitdance.com>
7 months ago[3.10] gh-127257: ssl: Raise OSError for ERR_LIB_SYS (GH-127361) (GH-127905) (GH...
Victor Stinner [Thu, 3 Apr 2025 16:26:17 +0000 (18:26 +0200)] 
[3.10] gh-127257: ssl: Raise OSError for ERR_LIB_SYS (GH-127361) (GH-127905) (GH-131971)

gh-127257: ssl: Raise OSError for ERR_LIB_SYS (GH-127361)

From the ERR_raise manpage:

    ERR_LIB_SYS

        This "library code" indicates that a system error is
        being reported.  In this case, the reason code given
        to `ERR_raise()` and `ERR_raise_data()` *must* be
        `errno(3)`.

This PR only handles ERR_LIB_SYS for the high-lever error types
SSL_ERROR_SYSCALL and SSL_ERROR_SSL, i.e., not the ones where
OpenSSL indicates it has some more information about the issue.

(cherry picked from commit f4b31edf2d9d72878dab1f66a36913b5bcc848ec)
(cherry picked from commit 7f707fa6c67d0bfa9bbc1a9f344b932789659397)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
7 months ago[3.10] gh-131261: Update libexpat to 2.7.0 (CVE-2024-8176) (GH-131272) (#131363)
Seth Michael Larson [Tue, 1 Apr 2025 09:40:26 +0000 (04:40 -0500)] 
[3.10] gh-131261: Update libexpat to 2.7.0 (CVE-2024-8176) (GH-131272) (#131363)

8 months ago[3.10] gh-105704: Disallow square brackets (`[` and `]`) in domain names for parsed...
Miss Islington (bot) [Wed, 19 Feb 2025 13:36:23 +0000 (14:36 +0100)] 
[3.10] gh-105704: Disallow square brackets (`[` and `]`) in domain names for parsed URLs (GH-129418) (#129529)

(cherry picked from commit d89a5f6a6e65511a5f6e0618c4c30a7aa5aba56a)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
8 months ago[3.10] gh-119511: Fix a potential denial of service in imaplib (GH-119514) (#129358)
Miss Islington (bot) [Wed, 19 Feb 2025 13:30:32 +0000 (14:30 +0100)] 
[3.10] gh-119511: Fix a potential denial of service in imaplib (GH-119514) (#129358)

The IMAP4 client could consume an arbitrary amount of memory when trying
to connect to a malicious server, because it read a "literal" data with a
single read(size) call, and BufferedReader.read() allocates the bytes
object of the specified size before reading. Now the IMAP4 client reads data
by chunks, therefore the amount of used memory is limited by the
amount of the data actually been sent by the server.
(cherry picked from commit 735f25c5e3a0f74438c86468ec4dfbe219d93c91)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
8 months ago[3.10] gh-122544: Change OS image in GitHub Actions to Ubuntu 22.04 (GH-122566) ...
Hugo van Kemenade [Wed, 19 Feb 2025 13:19:52 +0000 (15:19 +0200)] 
[3.10] gh-122544: Change OS image in GitHub Actions to Ubuntu 22.04 (GH-122566) (#130268)

Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: James De Bias <81095953+DBJim@users.noreply.github.com>
8 months ago[3.10] gh-107262: Update Tkinter tests for Tcl/Tk 8.6.14 (GH-119322) (#130274)
Miss Islington (bot) [Wed, 19 Feb 2025 08:52:03 +0000 (09:52 +0100)] 
[3.10] gh-107262: Update Tkinter tests for Tcl/Tk 8.6.14 (GH-119322) (#130274)

Co-authored-by: James De Bias <81095953+DBJim@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
8 months ago[3.10] gh-129509: Add required key to the dummy Read the Docs config file (#129510)
Petr Viktorin [Tue, 18 Feb 2025 08:42:42 +0000 (09:42 +0100)] 
[3.10] gh-129509: Add required key to the dummy Read the Docs config file (#129510)

8 months ago[3.10] Docs: pin python-docs-theme to 2025.2 (GH-129576) (#130067)
Adam Turner [Thu, 13 Feb 2025 01:39:02 +0000 (01:39 +0000)] 
[3.10] Docs: pin python-docs-theme to 2025.2 (GH-129576) (#130067)

[3.10] [3.11] Docs: pin python-docs-theme to 2025.2 (GH-129576)

* [3.11] Pin python-docs-theme

* Use today's release

---------
(cherry picked from commit 77ca2f66ea733f283fdaab403730e281babcbce8)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
8 months ago[3.10] gh-129641: Docs GHA build: use upload-artifact@v4 & Python 3.12 (#129642)
Petr Viktorin [Thu, 13 Feb 2025 01:31:51 +0000 (02:31 +0100)] 
[3.10] gh-129641: Docs GHA build: use upload-artifact@v4 & Python 3.12 (#129642)

* [3.10] gh-129641: Switch Docs GHA build to actions/upload-artifact@v4

Add options for backwards compatibility, from the docs at:
https://github.com/actions/upload-artifact?tab=readme-ov-file#breaking-changes

* Python Tutorial typo fix (#128077)

Backported form commit: 5a584c8f54bbeceae7ffa501291e29b7ddc8a0b9

This is a trivial change meant to trigger a Docs build.

* Use Python 3.12 for the 3.10 docs build

The pinned version of Sphinx requires `imghdr`, removed in Python 3.13.

---------

Co-authored-by: shallow-beach <96891913+shallow-beach@users.noreply.github.com>
8 months ago[3.10] gh-119461: Fix ThreadedVSOCKSocketStreamTest (GH-129171) (#129440)
Miss Islington (bot) [Thu, 13 Feb 2025 01:31:13 +0000 (02:31 +0100)] 
[3.10] gh-119461: Fix ThreadedVSOCKSocketStreamTest (GH-129171) (#129440)

* [3.11] gh-119461: Fix ThreadedVSOCKSocketStreamTest (GH-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 45db419c3104a14007ea9efbc4bff03aef8ed10c)

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

* gh-119461: Restore the testSocket VSOCK skipUnless removed by PR #119465 (#129561)

Restore the skipUnless removed by #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.

---------

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
9 months ago[3.10] gh-128874: Fix the documentation for blurb 2.0 (#128875) (#128890)
Victor Stinner [Tue, 21 Jan 2025 19:26:21 +0000 (20:26 +0100)] 
[3.10] gh-128874: Fix the documentation for blurb 2.0 (#128875) (#128890)

gh-128874: Fix the documentation for blurb 2.0 (#128875)

(cherry picked from commit 40a4d88a14c741172a158683c39d232c587c6f11)

10 months ago[3.10] gh-121277: Allow .. versionadded:: next in docs (GH-121278) (#127867)
Petr Viktorin [Fri, 13 Dec 2024 22:00:34 +0000 (23:00 +0100)] 
[3.10] gh-121277: Allow .. versionadded:: next in docs (GH-121278) (#127867)

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 7d24ea9db3e8fdca52058629c9ba577aba3d8e5c)

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

(cherry-picked from e349f73a5ad2856b0a7cbe4aef7cc081c7aed777)

Updates for 3.10

(cherry-picked from 3.11: f0895aa9c1d40d0add673cc51bd143556e22100a)

* Use version, not arguments directly

11 months agoPost 3.10.16
Pablo Galindo [Tue, 3 Dec 2024 18:35:58 +0000 (13:35 -0500)] 
Post 3.10.16

11 months agoPython 3.10.16 v3.10.16
Pablo Galindo [Tue, 3 Dec 2024 17:24:57 +0000 (12:24 -0500)] 
Python 3.10.16

11 months ago[3.10] gh-122792: Make IPv4-mapped IPv6 address properties consistent with IPv4 ...
Miss Islington (bot) [Tue, 3 Dec 2024 17:07:43 +0000 (18:07 +0100)] 
[3.10] gh-122792: Make IPv4-mapped IPv6 address properties consistent with IPv4 (GH-122793) (GH-123819)

Make IPv4-mapped IPv6 address properties consistent with IPv4.
(cherry picked from commit 76a1c5d18312712baed4699fe7333abb050ec9b7)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
11 months ago[3.10] gh-126623: Update libexpat to 2.6.4, make future updates easier (GH-126792...
Seth Michael Larson [Mon, 2 Dec 2024 15:07:06 +0000 (09:07 -0600)] 
[3.10] gh-126623: Update libexpat to 2.6.4, make future updates easier (GH-126792) (GH-126799)

(cherry picked from commit 3c9996909402fadc98e6ca2a64e75a71a7427352)

11 months ago[3.10] gh-103848: Adds checks to ensure that bracketed hosts found by urlsplit are...
Victor Stinner [Mon, 2 Dec 2024 12:37:05 +0000 (13:37 +0100)] 
[3.10] gh-103848: Adds checks to ensure that bracketed hosts found by urlsplit are of IPv6 or IPvFuture format (#103849) (#126975)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
(cherry picked from commit 29f348e232e82938ba2165843c448c2b291504c5)

Co-authored-by: JohnJamesUtley <81572567+JohnJamesUtley@users.noreply.github.com>
11 months ago[3.10] gh-127359: Pin Tcl/Tk to 8 (8.6) for testing macOS (GH-127365) (#127408)
Hugo van Kemenade [Sat, 30 Nov 2024 16:38:29 +0000 (18:38 +0200)] 
[3.10] gh-127359: Pin Tcl/Tk to 8 (8.6) for testing macOS (GH-127365) (#127408)

12 months ago[3.10] gh-113027: Fix test_variable_tzname in test_email (GH-113821) (#126438)
Petr Viktorin [Tue, 5 Nov 2024 19:55:43 +0000 (20:55 +0100)] 
[3.10] gh-113027: Fix test_variable_tzname in test_email (GH-113821) (#126438)

12 months ago[3.10] gh-124651: Quote template strings in `venv` activation scripts (GH-124712...
Victor Stinner [Mon, 4 Nov 2024 15:16:17 +0000 (16:16 +0100)] 
[3.10] gh-124651: Quote template strings in `venv` activation scripts (GH-124712) (GH-126185) (GH-126269) (GH-126300)

(cherry picked from commit ae961ae94bf19c8f8c7fbea3d1c25cc55ce8ae97)

12 months ago[3.10] gh-125529: Avoid f-strings in the metagrammar (#125582)
Petr Viktorin [Tue, 22 Oct 2024 11:41:51 +0000 (13:41 +0200)] 
[3.10] gh-125529: Avoid f-strings in the metagrammar (#125582)

Grammar actions need to be valid Python tokens and the accepted tokens need to be
listed in the actions mini-grammar).

In Python 3.12+ (PEP 701), f-strings are no longer STRING tokens, so pegen fails
to regenerate the metaparser on this Python version, as in:

   PYTHON_FOR_REGEN=python3.12 make regen-pegen-metaparser

Use `+` and plain strings rather than f-strings.

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
12 months ago[3.10] gh-125041: gh-90781: test_zlib: For s390x HW acceleration, skip checking the...
Petr Viktorin [Tue, 22 Oct 2024 11:11:21 +0000 (13:11 +0200)] 
[3.10] gh-125041: gh-90781: test_zlib: For s390x HW acceleration, skip checking the compressed bytes (GH-125042) (#125585)

gh-125041: gh-90781: test_zlib: For s390x HW acceleration, skip checking the compressed bytes (GH-125042)

This backports two commits:

- GH-31096 skipped the tests unconditionally
- GH-125042 skips only the possibly-failing assertion

(cherry picked from commit cc5a225cdc2a5d4e035dd08d59cef39182c10a6c)

12 months ago[3.10] gh-107902: gh-108948: Don't test setting suid/sgid/sticky on systems that...
Petr Viktorin [Tue, 22 Oct 2024 11:11:11 +0000 (13:11 +0200)] 
[3.10] gh-107902: gh-108948: Don't test setting suid/sgid/sticky on systems that don't support them (GH-108368) (GH-109697) (#125255)

* gh-107902: Don't test setting suid/sgid on systems that don't support them (GH-108368)

* gh-108948: Skip test_tarfile.test_modes() on EFTYPE error (#109697)

On FreeBSD, regular users cannot set the sticky bit. Skip the test if
chmod() fails with EFTYPE error.

---------

Co-authored-by: Victor Stinner <vstinner@python.org>
12 months ago[3.10] gh-100005: Skip test_script_as_dev_fd() on FreeBSD (GH-100006) (#125109)
Miss Islington (bot) [Tue, 22 Oct 2024 11:11:04 +0000 (13:11 +0200)] 
[3.10] gh-100005: Skip test_script_as_dev_fd() on FreeBSD (GH-100006) (#125109)

gh-100005: Skip test_script_as_dev_fd() on FreeBSD (GH-100006)

On FreeBSD, skip test_script_as_dev_fd() of test_cmd_line_script if
fdescfs is not mounted (at /dev/fd).
(cherry picked from commit 038b151963d9d4a5f4c852544fb5b0402ffcb218)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
12 months ago[3.10] gh-109396: Fix test_socket.test_hmac_sha1() in FIPS mode (GH-109423) (#125106)
Miss Islington (bot) [Tue, 22 Oct 2024 11:10:53 +0000 (13:10 +0200)] 
[3.10] gh-109396: Fix test_socket.test_hmac_sha1() in FIPS mode (GH-109423) (#125106)

[3.11] gh-109396: Fix test_socket.test_hmac_sha1() in FIPS mode (GH-109423) (GH-109427)

gh-109396: Fix test_socket.test_hmac_sha1() in FIPS mode (GH-109423)

Use a longer key: FIPS mode requires at least of at least 112 bits.
The previous key was only 32 bits.
(cherry picked from commit e091b9f20fa8e409003af79f3c468b8225e6dcd3)

(cherry picked from commit f7bfac4b3dd30920f97a542fd78c355ce62aa267)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
12 months ago[3.10] gh-89452: GHA: Set --with-dbmliborder to avoid issues with homebrew's gdbm...
Petr Viktorin [Tue, 8 Oct 2024 14:37:22 +0000 (16:37 +0200)] 
[3.10] gh-89452: GHA: Set --with-dbmliborder to avoid issues with homebrew's gdbm 1.24 (#125112)

Per https://github.com/python/cpython/issues/89452#issuecomment-1116329316,
the issue is fixed in configure for 3.11+, and

> For older Python versions, the workaround is to build with:
>
>     ./configure --with-dbmliborder=gdbm:ndbm

We need this workaround in GitHub Actions, otherwise the tests fail.

14 months agoPost 3.10.15
Pablo Galindo [Sat, 7 Sep 2024 00:46:51 +0000 (01:46 +0100)] 
Post 3.10.15

14 months agoPython 3.10.15 v3.10.15
Pablo Galindo [Sat, 7 Sep 2024 00:19:15 +0000 (01:19 +0100)] 
Python 3.10.15

14 months ago[3.10] [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr...
Petr Viktorin [Fri, 6 Sep 2024 11:14:22 +0000 (13:14 +0200)] 
[3.10] [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr() (GH-111116) (#123768)

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 4a153a1d3b18803a684cd1bcc2cdf3ede3dbae19)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-Authored-By: Thomas Dwyer <github@tomd.tel>
14 months ago[3.10] gh-123678: Upgrade libexpat 2.6.3 (#123710)
Seth Michael Larson [Thu, 5 Sep 2024 12:27:33 +0000 (07:27 -0500)] 
[3.10] gh-123678: Upgrade libexpat 2.6.3 (#123710)

(cherry picked from commit fdc04ad75a410ed3af99edfc32c38b5fc3375f52)

14 months ago[3.10] gh-123693: Use platform-agnostic semantics when processing zipfile.Path.name...
Jason R. Coombs [Thu, 5 Sep 2024 09:15:03 +0000 (05:15 -0400)] 
[3.10] gh-123693: Use platform-agnostic semantics when processing zipfile.Path.name. (#123694)

Applies changes from zipp 3.20.1 and jaraco/zippGH-124
(cherry picked from commit 2231286d78d328c2f575e0b05b16fe447d1656d6)
(cherry picked from commit 17b77bb)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
14 months ago[3.10] gh-123270: Replaced SanitizedNames with a more surgical fix. (GH-123354) ...
Jason R. Coombs [Wed, 4 Sep 2024 20:41:39 +0000 (16:41 -0400)] 
[3.10] gh-123270: Replaced SanitizedNames with a more surgical fix. (GH-123354) (#123426)

Applies changes from zipp 3.20.1 and jaraco/zippGH-124
(cherry picked from commit 2231286d78d328c2f575e0b05b16fe447d1656d6)
(cherry picked from commit 17b77bb)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
14 months ago[3.10] gh-112275: Fix HEAD_LOCK deadlock in child process after fork (GH-112336)...
Miss Islington (bot) [Wed, 4 Sep 2024 17:26:29 +0000 (19:26 +0200)] 
[3.10] gh-112275: Fix HEAD_LOCK deadlock in child process after fork (GH-112336) (#123687)

HEAD_LOCK is called from _PyEval_ReInitThreads->_PyThreadState_DeleteExcept before _PyRuntimeState_ReInitThreads reinit runtime->interpreters.mutex which might be locked before fork.

(cherry picked from commit 522799a05e3e820339718151ac055af6d864d463)

Co-authored-by: ChuBoning <102216855+ChuBoning@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
14 months ago[3.10] gh-119690: Fixes buffer type confusion in _winapi.CreateFile and _winapi.Creat...
Steve Dower [Wed, 4 Sep 2024 15:57:40 +0000 (16:57 +0100)] 
[3.10] gh-119690: Fixes buffer type confusion in _winapi.CreateFile and _winapi.CreateNamedPipe audit events (#119735)

gh-119690: Fixes buffer type confusion in _winapi.CreateFile and _winapi.CreateNamedPipe audit events

14 months ago[3.10] gh-123067: Fix quadratic complexity in parsing "-quoted cookie values with...
Miss Islington (bot) [Wed, 4 Sep 2024 15:50:36 +0000 (17:50 +0200)] 
[3.10] gh-123067: Fix quadratic complexity in parsing "-quoted cookie values with backslashes (GH-123075) (#123106)

This fixes CVE-2024-7592.
(cherry picked from commit 44e458357fca05ca0ae2658d62c8c595b048b5ef)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
14 months ago[3.10] gh-67693: Fix urlunparse() and urlunsplit() for URIs with path starting with...
Serhiy Storchaka [Wed, 4 Sep 2024 15:43:30 +0000 (18:43 +0300)] 
[3.10] gh-67693: Fix urlunparse() and urlunsplit() for URIs with path starting with multiple slashes and no authority (GH-113563) (#119026)

(cherry picked from commit e237b25a4fa5626fcd1b1848aa03f725f892e40e)

14 months ago[3.10] gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233...
Łukasz Langa [Wed, 4 Sep 2024 15:38:31 +0000 (17:38 +0200)] 
[3.10] gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233) (#122609)

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.

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

(cherry picked from commit 097633981879b3c9de9a1dd120d3aa585ecc2384)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Bas Bloemsaat <bas@bloemsaat.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
14 months ago[3.10] gh-121285: Remove backtracking when parsing tarfile headers (GH-121286) (...
Seth Michael Larson [Tue, 3 Sep 2024 15:07:53 +0000 (10:07 -0500)] 
[3.10] gh-121285: Remove backtracking when parsing tarfile headers (GH-121286) (#123640)

* 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 34ddb64d088dd7ccc321f6103d23153256caa5d4)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
14 months ago[3.10] gh-122905: Sanitize names in zipfile.Path. (GH-122906) (#123160)
Jason R. Coombs [Thu, 22 Aug 2024 23:24:33 +0000 (19:24 -0400)] 
[3.10] gh-122905: Sanitize names in zipfile.Path. (GH-122906) (#123160)

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

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

Ported from zipp 3.19.1; ref jaraco/zippGH-119.

(cherry picked from commit 9cd03263100ddb1657826cc4a71470786cab3932)

* [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 9cd03263100ddb1657826cc4a71470786cab3932)

(cherry picked from commit 795f2597a4be988e2bb19b69ff9958e981cb894e)

15 months ago[3.10] gh-122133: Rework pure Python socketpair tests to avoid use of importlib.reloa...
Miss Islington (bot) [Fri, 2 Aug 2024 13:10:39 +0000 (15:10 +0200)] 
[3.10] gh-122133: Rework pure Python socketpair tests to avoid use of importlib.reload. (GH-122493) (GH-122507)

(cherry picked from commit f071f01b7b7e19d7d6b3a4b0ec62f820ecb14660)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
15 months ago[3.10] gh-122133: Authenticate socket connection for `socket.socketpair()` fallback...
Miss Islington (bot) [Tue, 30 Jul 2024 12:44:16 +0000 (14:44 +0200)] 
[3.10] gh-122133: Authenticate socket connection for `socket.socketpair()` fallback (GH-122134) (#122427)

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 78df1043dbdce5c989600616f9f87b4ee72944e5)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
15 months ago[3.10] gh-121957: Emit audit events for python -i and python -m asyncio (GH-122119)
Łukasz Langa [Mon, 22 Jul 2024 11:48:50 +0000 (13:48 +0200)] 
[3.10] gh-121957: Emit audit events for python -i and python -m asyncio (GH-122119)

17 months ago[3.10] gh-112769: test_zlib: test_zlib: Fix comparison of ZLIB_RUNTIME_VERSION with...
Ned Deily [Tue, 28 May 2024 15:57:05 +0000 (11:57 -0400)] 
[3.10] gh-112769: test_zlib: test_zlib: Fix comparison of ZLIB_RUNTIME_VERSION with non-int suffix (GH-112771) (#119565)

[3.10] gh-112769: test_zlib: test_zlib: Fix comparison of ZLIB_RUNTIME_VERSION with non-int suffix

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)

Co-authored-by: Miro Hrončok miro@hroncok.cz
17 months ago[3.10] gh-118486: Support mkdir(mode=0o700) on Windows (GH-118488) (GH-118740)
Steve Dower [Fri, 24 May 2024 17:26:44 +0000 (18:26 +0100)] 
[3.10] gh-118486: Support mkdir(mode=0o700) on Windows (GH-118488) (GH-118740)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
18 months ago[3.10] gh-100454: Fix running SSL tests with OpenSSL 3.1+ (GH-100456) (GH-118262)
Dimitri John Ledkov [Tue, 7 May 2024 10:00:40 +0000 (11:00 +0100)] 
[3.10] gh-100454: Fix running SSL tests with OpenSSL 3.1+ (GH-100456) (GH-118262)

This fixes Ubuntu pipeline with OpenSSL 3.1+

Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
18 months ago[3.10] gh-113171: gh-65056: Fix "private" (non-global) IP address ranges (GH-113179...
Petr Viktorin [Tue, 7 May 2024 09:56:13 +0000 (11:56 +0200)] 
[3.10] gh-113171: gh-65056: Fix "private" (non-global) IP address ranges (GH-113179) (GH-113186) (GH-118177) (GH-118229)

The _private_networks variables, used by various is_private
implementations, were missing some ranges and at the same time had
overly strict ranges (where there are more specific ranges considered
globally reachable by the IANA registries).

This patch updates the ranges with what was missing or otherwise
incorrect.

100.64.0.0/10 is left alone, for now, as it's been made special in [1].

The _address_exclude_many() call returns 8 networks for IPv4, 121
networks for IPv6.

[1] https://github.com/python/cpython/issues/61602

In 3.10 and below, is_private checks whether the network and broadcast
address are both private.
In later versions (where the test wss backported from), it checks
whether they both are in the same private network.

For 0.0.0.0/0, both 0.0.0.0 and 255.225.255.255 are private,
but one is in 0.0.0.0/8 ("This network") and the other in
255.255.255.255/32 ("Limited broadcast").

---------

Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
18 months ago[3.10] gh-116741: Upgrade libexpat to 2.6.2 (GH-117296) (GH-118186)
Seth Michael Larson [Tue, 7 May 2024 08:50:19 +0000 (03:50 -0500)] 
[3.10] gh-116741: Upgrade libexpat to 2.6.2 (GH-117296) (GH-118186)

(cherry picked from commit c9829eec0883a8991ea4d319d965e123a3cf6c20)

18 months ago[3.10] gh-114539: Clarify implicit launching of shells by subprocess (GH-117996)...
Miss Islington (bot) [Tue, 7 May 2024 08:47:46 +0000 (10:47 +0200)] 
[3.10] gh-114539: Clarify implicit launching of shells by subprocess (GH-117996) (GH-118004)

(cherry picked from commit a4b44d39cd6941cc03590fee7538776728bdfd0a)

Co-authored-by: Steve Dower <steve.dower@python.org>
19 months ago[3.10] gh-116773: Fix overlapped memory corruption crash (GH-116774) (GH-117079)
jkriegshauser [Wed, 27 Mar 2024 15:24:34 +0000 (08:24 -0700)] 
[3.10] gh-116773: Fix overlapped memory corruption crash (GH-116774) (GH-117079)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
19 months ago[3.10] gh-117187: Fix XML tests for vanilla Expat <2.6.0 (GH-117203) (GH-117246)
Miss Islington (bot) [Wed, 27 Mar 2024 13:44:58 +0000 (14:44 +0100)] 
[3.10] gh-117187: Fix XML tests for vanilla Expat <2.6.0 (GH-117203) (GH-117246)

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.

Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
19 months agoPost 3.10.14
Łukasz Langa [Tue, 19 Mar 2024 23:40:17 +0000 (00:40 +0100)] 
Post 3.10.14

19 months agoPython 3.10.14 v3.10.14
Łukasz Langa [Tue, 19 Mar 2024 21:42:28 +0000 (22:42 +0100)] 
Python 3.10.14

19 months ago[3.10] gh-115197: Stop resolving host in urllib.request proxy bypass (GH-115210)...
Miss Islington (bot) [Tue, 19 Mar 2024 10:53:33 +0000 (11:53 +0100)] 
[3.10] gh-115197: Stop resolving host in urllib.request proxy bypass (GH-115210) (GH-116070)

Use of a proxy is intended to defer DNS for the hosts to the proxy itself, rather than a potential for information leak of the host doing DNS resolution itself for any reason.  Proxy bypass lists are strictly name based.  Most implementations of proxy support agree.
(cherry picked from commit c43b26d02eaa103756c250e8d36829d388c5f3be)

Co-authored-by: Weii Wang <weii.wang@canonical.com>
20 months ago[3.10] gh-115398: Expose Expat >=2.6.0 reparse deferral API (CVE-2023-52425) (GH...
Sebastian Pipping [Wed, 6 Mar 2024 23:02:55 +0000 (00:02 +0100)] 
[3.10] gh-115398: Expose Expat >=2.6.0 reparse deferral API (CVE-2023-52425) (GH-115623) (GH-116270)

Allow controlling Expat >=2.6.0 reparse deferral (CVE-2023-52425) by adding five new methods:

- `xml.etree.ElementTree.XMLParser.flush`
- `xml.etree.ElementTree.XMLPullParser.flush`
- `xml.parsers.expat.xmlparser.GetReparseDeferralEnabled`
- `xml.parsers.expat.xmlparser.SetReparseDeferralEnabled`
- `xml.sax.expatreader.ExpatParser.flush`

Based on the "flush" idea from https://github.com/python/cpython/pull/115138#issuecomment-1932444270 .

Includes code suggested-by: Snild Dolkow <snild@sony.com>
and by core dev Serhiy Storchaka.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
20 months ago[3.10] gh-115399: Document CVE-2023-52425 under "XML vulnerabilities" (GH-115400...
Miss Islington (bot) [Wed, 21 Feb 2024 11:43:27 +0000 (12:43 +0100)] 
[3.10] gh-115399: Document CVE-2023-52425 under "XML vulnerabilities" (GH-115400) (GH-115762)

Doc/library/xml.rst: Document CVE-2023-52425 under "XML vulnerabilities"
(cherry picked from commit fbd40ce46e7335a5dbaf48a3aa841be22d7302ba)

Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
20 months ago[3.10] gh-114572: Fix locking in cert_store_stats and get_ca_certs (GH-114573) (...
Miss Islington (bot) [Tue, 20 Feb 2024 16:35:27 +0000 (17:35 +0100)] 
[3.10] gh-114572: Fix locking in cert_store_stats and get_ca_certs (GH-114573) (#115548)

gh-114572: Fix locking in cert_store_stats and get_ca_certs (GH-114573)

* gh-114572: Fix locking in cert_store_stats and get_ca_certs

cert_store_stats and get_ca_certs query the SSLContext's X509_STORE with
X509_STORE_get0_objects, but reading the result requires a lock. See
https://github.com/openssl/openssl/pull/23224 for details.

Instead, use X509_STORE_get1_objects, newly added in that PR.
X509_STORE_get1_objects does not exist in current OpenSSLs, but we can
polyfill it with X509_STORE_lock and X509_STORE_unlock.

* Work around const-correctness problem

* Add missing X509_STORE_get1_objects failure check

* Add blurb
(cherry picked from commit bce693111bff906ccf9281c22371331aaff766ab)

Co-authored-by: David Benjamin <davidben@google.com>
20 months ago[3.10] Upgrade bundled libexpat to 2.6.0 (GH-115399) (GH-115468) (#115473)
Miss Islington (bot) [Mon, 19 Feb 2024 14:58:39 +0000 (15:58 +0100)] 
[3.10] Upgrade bundled libexpat to 2.6.0 (GH-115399) (GH-115468) (#115473)

Manual backport due to code differences.
(cherry picked from commit e071b0d558b2f5cddd5a9fc6afadb4ba109ec77e)

Co-authored-by: Seth Michael Larson <seth@python.org>
20 months ago[3.10] gh-97032: avoid test_squeezer crash on macOS buildbots (#115508)
Ned Deily [Mon, 19 Feb 2024 13:43:38 +0000 (08:43 -0500)] 
[3.10] gh-97032: avoid test_squeezer crash on macOS buildbots (#115508)

avoid test_squeezer crash on macOS buildbots

20 months ago[3.10] gh-115133: Fix tests for XMLPullParser with Expat 2.6.0 (GH-115164) (#115525)
Miss Islington (bot) [Mon, 19 Feb 2024 13:38:49 +0000 (14:38 +0100)] 
[3.10] gh-115133: Fix tests for XMLPullParser with Expat 2.6.0 (GH-115164) (#115525)

gh-115133: Fix tests for XMLPullParser with Expat 2.6.0 (GH-115164)

Feeding the parser by too small chunks defers parsing to prevent
CVE-2023-52425. Future versions of Expat may be more reactive.
(cherry picked from commit 4a08e7b3431cd32a0daf22a33421cd3035343dc4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
20 months ago[3.10] gh-105821: Use a raw f-string in test_httpservers.py (GH-105822) (#115519)
Miss Islington (bot) [Fri, 16 Feb 2024 01:06:00 +0000 (02:06 +0100)] 
[3.10] gh-105821: Use a raw f-string in test_httpservers.py (GH-105822) (#115519)

20 months ago[3.10] Add missing sections to blurbs (GH-114553) (#115338)
Miss Islington (bot) [Wed, 14 Feb 2024 13:23:26 +0000 (14:23 +0100)] 
[3.10] Add missing sections to blurbs (GH-114553) (#115338)

21 months ago[3.10] gh-46968: Fix invalid reference to Sound eXchange (SoX) 12.17.7 license (GH...
Łukasz Langa [Tue, 6 Feb 2024 18:53:23 +0000 (19:53 +0100)] 
[3.10] gh-46968: Fix invalid reference to Sound eXchange (SoX) 12.17.7 license (GH-115094) (GH-115096)

(cherry picked from commit b39119916c0daaf5e5fdfec63e18ad97f29e2e72)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
21 months ago[3.10] gh-111239: Update Windows build to use zlib 1.3.1 (GH-114877) (#115079)
Miss Islington (bot) [Tue, 6 Feb 2024 14:40:18 +0000 (15:40 +0100)] 
[3.10] gh-111239: Update Windows build to use zlib 1.3.1 (GH-114877) (#115079)

gh-111239: Update Windows build to use zlib 1.3.1 (GH-114877)
(cherry picked from commit 618d7256e78da8200f6e2c6235094a1ef885dca4)

Co-authored-by: Zachary Ware <zach@python.org>
21 months ago[3.10] gh-113659: Skip hidden .pth files (GH-113660) (GH-114145)
Miss Islington (bot) [Thu, 18 Jan 2024 13:39:30 +0000 (14:39 +0100)] 
[3.10] gh-113659: Skip hidden .pth files (GH-113660) (GH-114145)

Skip .pth files with names starting with a dot or hidden file attribute.
(cherry picked from commit 74208ed0c440244fb809d8acc97cb9ef51e888e3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
21 months ago[3.10] gh-107888: Fix test_mmap.test_access_parameter() on macOS 14 (GH-109928) ...
Miss Islington (bot) [Wed, 17 Jan 2024 14:02:42 +0000 (15:02 +0100)] 
[3.10] gh-107888: Fix test_mmap.test_access_parameter() on macOS 14 (GH-109928) (GH-114185)

(cherry picked from commit 9dbfe2dc8e7bba25e52f9470ae6969821a365297)

Co-authored-by: Victor Stinner <vstinner@python.org>
21 months ago[3.10] gh-114021: Pin various sphinxcontrib extensions to older versions (GH-114022...
Adam Turner [Wed, 17 Jan 2024 13:50:24 +0000 (13:50 +0000)] 
[3.10] gh-114021: Pin various sphinxcontrib extensions to older versions (GH-114022) (GH-114038)

(cherry picked from commit 94b1d1fa38ada8cf7d196184a04a195c152eed75)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
21 months ago[3.10] gh-109858: Protect zipfile from "quoted-overlap" zipbomb (GH-110016) (GH-113914)
Miss Islington (bot) [Wed, 17 Jan 2024 13:50:10 +0000 (14:50 +0100)] 
[3.10] gh-109858: Protect zipfile from "quoted-overlap" zipbomb (GH-110016) (GH-113914)

Raise BadZipFile when try to read an entry that overlaps with other entry or
central directory.
(cherry picked from commit 66363b9a7b9fe7c99eba3a185b74c5fdbf842eba)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
21 months ago[3.10] gh-91133: tempfile.TemporaryDirectory: fix symlink bug in cleanup (GH-99930...
Serhiy Storchaka [Wed, 17 Jan 2024 13:49:56 +0000 (15:49 +0200)] 
[3.10] gh-91133: tempfile.TemporaryDirectory: fix symlink bug in cleanup (GH-99930) (GH-112840)

(cherry picked from commit 81c16cd94ec38d61aa478b9a452436dc3b1b524d)

Co-authored-by: Søren Løvborg <sorenl@unity3d.com>
21 months ago[3.10] bpo-37013: Fix the error handling in socket.if_indextoname() (GH-13503) (GH...
Miss Islington (bot) [Wed, 17 Jan 2024 13:49:40 +0000 (14:49 +0100)] 
[3.10] bpo-37013: Fix the error handling in socket.if_indextoname() (GH-13503) (GH-112599)

* Fix a crash when pass UINT_MAX.
* Fix an integer overflow on 64-bit non-Windows platforms.
(cherry picked from commit 0daf555c6fb3feba77989382135a58215e1d70a5)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
23 months ago[3.10] gh-112160: Add 'regen-configure' make target (#112163)
Seth Michael Larson [Mon, 20 Nov 2023 23:38:10 +0000 (17:38 -0600)] 
[3.10] gh-112160: Add 'regen-configure' make target (#112163)

Add 'regen-configure' make target

2 years ago[3.10] gh-101180: Fix a bug where iso2022_jp_3 and iso2022_jp_2004 codecs read out...
Łukasz Langa [Mon, 6 Nov 2023 14:46:20 +0000 (15:46 +0100)] 
[3.10] gh-101180: Fix a bug where iso2022_jp_3 and iso2022_jp_2004 codecs read out of bounds (gh-111695) (gh-111779)

(cherry picked from commit c8faa3568afd255708096f6aa8df0afa80cf7697)

Co-authored-by: Masayuki Moriyama <masayuki.moriyama@miraclelinux.com>
2 years ago[3.10] gh-109991: Update Windows build to use OpenSSL 1.1.1w (GH-110090)
Steve Dower [Tue, 10 Oct 2023 11:46:16 +0000 (12:46 +0100)] 
[3.10] gh-109991: Update Windows build to use OpenSSL 1.1.1w (GH-110090)

Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
2 years ago[3.10] gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.11 and multissltests...
Ned Deily [Thu, 28 Sep 2023 14:34:02 +0000 (10:34 -0400)] 
[3.10] gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.11 and multissltests to use 1.1.1w, 3.0.11, and 3.1.3. (#110007)

gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.11 and multissltests to use 1.1.1w, 3.0.11, and 3.1.3.

(cherry picked from commit c88037d137a98d7c399c7bd74d5117b5bcae1543)

2 years ago[3.10] gh-109002: Ensure only one wheel for each vendored package (GH-109003) (#109007)
Miss Islington (bot) [Wed, 6 Sep 2023 18:01:13 +0000 (11:01 -0700)] 
[3.10] gh-109002: Ensure only one wheel for each vendored package (GH-109003) (#109007)

Output with one wheel:
```
❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py
Verifying checksum for /Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl.
Expected digest: 7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be
Actual digest:   7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be
::notice file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl::Successfully verified the checksum of the pip wheel.
```

Output with two wheels:
```
❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py
::error file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-22.0.4-py3-none-any.whl::Found more than one wheel for package pip.

::error file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl::Found more than one wheel for package pip.
```

Output without wheels:
```
❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py
::error file=::Could not find a pip wheel on disk.
```
(cherry picked from commit f8a047941f2e4a1848700c21d58a08c9ec6a9c68)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2 years ago[3.10] CI: Bump GitHub Actions (GH-108879) (#108892)
Hugo van Kemenade [Tue, 5 Sep 2023 20:39:13 +0000 (14:39 -0600)] 
[3.10] CI: Bump GitHub Actions (GH-108879) (#108892)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2 years ago[3.10] Add a dummy .rtfd.yml file to silence invalid failing webhooks (#108908)
Łukasz Langa [Tue, 5 Sep 2023 15:08:51 +0000 (17:08 +0200)] 
[3.10] Add a dummy .rtfd.yml file to silence invalid failing webhooks (#108908)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>