27327 Commits

Author SHA1 Message Date
Miss Islington (bot)
afc40bdd3d
[3.11] gh-119451: Fix a potential denial of service in http.client (GH-119454) (#142141)
gh-119451: Fix a potential denial of service in http.client (GH-119454)

Reading the whole body of the HTTP response could cause OOM if
the Content-Length value is too large even if the server does not send
a large amount of data. Now the HTTP client reads large data by chunks,
therefore the amount of consumed memory is proportional to the amount
of sent data.
(cherry picked from commit 5a4c4a033a4a54481be6870aa1896fad732555b5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-01-25 17:11:02 +00:00
Miss Islington (bot)
a46c10ec9d
[3.11] gh-142145: Remove quadratic behavior in node ID cache clearing (GH-142146) (#142212)
* gh-142145: Remove quadratic behavior in node ID cache clearing (GH-142146)

* Remove quadratic behavior in node ID cache clearing

Co-authored-by: Jacob Walls <38668450+jacobtylerwalls@users.noreply.github.com>

* Add news fragment

---------
(cherry picked from commit 08d8e18ad81cd45bc4a27d6da478b51ea49486e4)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Jacob Walls <38668450+jacobtylerwalls@users.noreply.github.com>

* [3.14] gh-142754: Ensure that Element & Attr instances have the ownerDocument attribute (GH-142794) (#142818)

gh-142754: Ensure that Element & Attr instances have the ownerDocument attribute (GH-142794)
(cherry picked from commit 1cc7551b3f9f71efbc88d96dce90f82de98b2454)

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

* gh-142145: relax the no-longer-quadratic test timing (GH-143030)

* gh-142145: relax the no-longer-quadratic test timing

* require cpu resource
(cherry picked from commit 8d2d7bb2e754f8649a68ce4116271a4932f76907)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>

* merge NEWS entries into one

---------

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Jacob Walls <38668450+jacobtylerwalls@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2026-01-25 17:10:53 +00:00
Miss Islington (bot)
fa1aae0e34
[3.11] gh-119452: Fix a potential virtual memory allocation denial of service in http.server (GH-142216) (#142298)
[3.14] gh-119452: Fix a potential virtual memory allocation denial of service in http.server (GH-142216)

The CGI server on Windows could consume the amount of memory specified
in the Content-Length header of the request even if the client does not
send such much data. Now it reads the POST request body by chunks,
therefore the memory consumption is proportional to the amount of sent
data.
(cherry picked from commit 0e4f4f1a4633f2d215fb5a803cae278aeea31845)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-01-25 17:10:45 +00:00
Miss Islington (bot)
e9970f0772
[3.11] gh-143935: Email preserve parens when folding comments (GH-143936) (#144037)
gh-143935: Email preserve parens when folding comments (GH-143936)

Fix a bug in the folding of comments when flattening an email message
using a modern email policy. Comments consisting of a very long sequence of
non-foldable characters could trigger a forced line wrap that omitted the
required leading space on the continuation line, causing the remainder of
the comment to be interpreted as a new header field. This enabled header
injection with carefully crafted inputs.
(cherry picked from commit 17d1490aa97bd6b98a42b1a9b324ead84e7fd8a2)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Denis Ledoux <dle@odoo.com>
2026-01-25 17:10:38 +00:00
Miss Islington (bot)
b1869ff648
[3.11] gh-143919: Reject control characters in http cookies (#144092)
gh-143919: Reject control characters in http cookies
(cherry picked from commit 95746b3a13a985787ef53b977129041971ed7f70)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2026-01-25 17:10:18 +00:00
Miss Islington (bot)
842ce19a0c
[3.11] gh-144125: email: verify headers are sound in BytesGenerator (#144189)
gh-144125: email: verify headers are sound in BytesGenerator
(cherry picked from commit 052e55e7d44718fe46cbba0ca995cb8fcc359413)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Denis Ledoux <dle@odoo.com>
Co-authored-by: Denis Ledoux <5822488+beledouxdenis@users.noreply.github.com>
Co-authored-by: Petr Viktorin <302922+encukou@users.noreply.github.com>
Co-authored-by: Bas Bloemsaat <1586868+basbloemsaat@users.noreply.github.com>
2026-01-25 17:09:56 +00:00
Seth Michael Larson
3f396ca9d7
[3.11] gh-143925: Reject control characters in data: URL mediatypes (#144114)
(cherry picked from commit f25509e78e8be6ea73c811ac2b8c928c28841b9f)
(cherry picked from commit 2c9c746077d8119b5bcf5142316992e464594946)
2026-01-25 17:05:19 +00:00
Gregory P. Smith
e4846a93ac
[3.11] gh-143916: Reject control characters in wsgiref.headers.Headers
gh-143916: Reject control characters in wsgiref.headers.Headers  (GH-143917)

* Add 'test.support' fixture for C0 control characters
* gh-143916: Reject control characters in wsgiref.headers.Headers

(cherry picked from commit f7fceed79ca1bceae8dbe5ba5bc8928564da7211)
(cherry picked from commit 22e4d55285cee52bc4dbe061324e5f30bd4dee58)

Co-authored-by: Seth Michael Larson <seth@python.org>
2026-01-20 22:51:58 +00:00
Sebastian Pipping
9bbb68a524
[3.11] gh-90949: add Expat API to prevent XML deadly allocations (CVE-2025-59375) (GH-139234) (#139529)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-11-25 15:25:17 +00:00
Miss Islington (bot)
3b7d81da07
[3.11] gh-136063: fix quadratic-complexity parsing in email.message._parseparam (GH-136072) (GH-140830)
(cherry picked from commit 680a5d070f59798bb88a1bb6eb027482b8d85c34)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-10-31 18:29:53 +01:00
Łukasz Langa
5dceb93486
[3.11] gh-136065: Fix quadratic complexity in os.path.expandvars() (GH-134952) (GH-140848)
(cherry picked from commit f029e8db626ddc6e3a3beea4eff511a71aaceb5c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-10-31 18:15:08 +01:00
Serhiy Storchaka
a18b38172a
[3.11] gh-137836: Support more RAWTEXT and PLAINTEXT elements in HTMLParser (GH-137837) (GH-140842) (GH-140852)
(cherry picked from commit a17c57eee5b5cc81390750d07e4800b19c0c3084)
(cherry picked from commit 0329bd11c7e98484727bbb9062d53a8fa53ac7fd)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-10-31 18:14:55 +01:00
Gregory P. Smith
0cd888b8d3
[3.11] gh-120384: gh-120298: Fix array-out-of-bounds & use after free list (GH-121345)
(cherry picked from commit 8334a1b55c93068f5d243852029baa83377ff6c9)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-10-31 15:19:07 +01:00
Pablo Galindo
cd1c3a6342 Python 3.11.14 2025-10-09 18:16:55 +02:00
Miss Islington (bot)
1d29afb0d6
[3.11] gh-139700: Check consistency of the zip64 end of central directory record (GH-139702) (GH-139708) (GH-139713)
(cherry picked from commit 333d4a6f4967d3ace91492a39ededbcf3faa76a6)

Support records with "zip64 extensible data" if there are no bytes
prepended to the ZIP file.
(cherry picked from commit 162997bb70e067668c039700141770687bc8f267)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-10-08 13:46:45 +02:00
Miss Islington (bot)
22d5724fbb
[3.11] gh-135661: Fix CDATA section parsing in HTMLParser (GH-135665) (GH-137774) (GH-139659)
"] ]>" and "]] >" no longer end the CDATA section.

Make CDATA section parsing  context depending.
Add private method HTMLParser._set_support_cdata() to change the context.
If called with True, "<[CDATA[" starts a CDATA section which ends with "]]>".
If called with False, "<[CDATA[" starts a bogus comments which ends with ">".
(cherry picked from commit 0cbbfc462119b9107b373c24d2bda5a1271bed36)
(cherry picked from commit dcf24768c918c41821cda6fe6a1aa20ce26545dd)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-10-07 14:05:06 +02:00
Sebastian Pipping
1459d1f1f1
[3.11] gh-139400: Make sure that parent parsers outlive their subparsers in pyexpat (GH-139403) (#139612)
* gh-139400: Make sure that parent parsers outlive their subparsers in `pyexpat` (#139403)

* Modules/pyexpat.c: Disallow collection of in-use parent parsers.

Within libexpat, a parser created via `XML_ExternalEntityParserCreate`
is relying on its parent parser throughout its entire lifetime.
Prior to this fix, is was possible for the parent parser to be
garbage-collected too early.

(cherry picked from commit 6edb2ddb5f3695cf4938979d645f31d7fba43ec8)

* Move news item from section "Core and Builtins" to section "Security"
2025-10-07 00:34:05 +01:00
Stan Ulbrych
6cb164975e
[3.11] gh-139312: Update bundled libexpat to 2.7.3 (GH-139319) (#139378) 2025-09-28 14:47:21 +01:00
Stan Ulbrych
048f00d660
[3.11] gh-138998: Upgrade vendored expat to 2.7.2 (#138999) (#139056)
gh-138998: Upgrade vendored expat to 2.7.2 (#138999)

(cherry picked from commit 64c876dd6812ade19cb7a0c619111d30f0b2b860)
2025-09-26 21:37:39 +01:00
Serhiy Storchaka
02feb83af2
[3.11] gh-118350: Fix support of elements "textarea" and "title" in HTMLParser (GH-135310) (GH-137782)
(cherry picked from commit 4d02f31cdd45d81b95540d9076222b709d4f2335)

Co-authored-by: Timon Viola <44016238+timonviola@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-09-13 22:35:57 +02:00
Miss Islington (bot)
b4ec17488e
[3.11] gh-130577: tarfile now validates archives to ensure member offsets are non-negative (GH-137027) (#137172)
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>
2025-08-19 19:00:46 +01:00
Miss Islington (bot)
3511c2e546
[3.11] gh-135661: Fix parsing attributes with whitespaces around the "=" separator in HTMLParser (GH-136908) (GH-136920)
This fixes a regression introduced in GH-135930.
(cherry picked from commit dee650189497735edbc08a54edabb5b06ef1bd09)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-07-22 11:56:55 +02:00
Miss Islington (bot)
228509edab
[3.11] gh-135661: Fix parsing start and end tags in HTMLParser according to the HTML5 standard (GH-135930) (GH-136268) (#136291)
* 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>
2025-07-12 14:26:49 +02:00
Miss Islington (bot)
d8f6297e6d
[3.11] gh-102555: Fix comment parsing in HTMLParser according to the HTML5 standard (GH-135664) (GH-136274)
* "--!>" 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>
2025-07-12 14:24:39 +02:00
Serhiy Storchaka
f3c6f882cd
[3.11] gh-135462: Fix quadratic complexity in processing special input in HTMLParser (GH-135464) (GH-135484)
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)
2025-07-03 23:05:46 +02:00
Łukasz Langa
c96ab19ae4
[3.11] gh-135374: Update the bundled copy of setuptools to 79.0.1 (#135396) 2025-06-11 17:57:25 +02:00
Pablo Galindo
498b971ea3
Python 3.11.13 2025-06-03 19:38:25 +01:00
T. Wouters
4633f3f497
[3.11] gh-135034: Normalize link targets in tarfile, add os.path.realpath(strict='allow_missing') (GH-135037) (GH-135068)
Addresses CVEs 2024-12718, 2025-4138, 2025-4330, and 2025-4517.
(cherry picked from commit 3612d8f51741b11f36f8fb0494d79086bac9390a)
(cherry picked from commit c358142cab7ce621a2745262a90df967b357f61c)

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>
2025-06-03 16:58:39 +02:00
Miss Islington (bot)
2c6ca1a9ad
[3.11] gh-128840: Fix parsing long IPv6 addresses with embedded IPv4 address (GH-134836) (GH-135091)
(cherry picked from commit d83576bf48d07d5e29d5d171c4e25afb048622aa)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-06-03 16:24:20 +02:00
Miss Islington (bot)
9df171dbba
[3.11] gh-123409: fix IPv6Address.reverse_pointer for IPv4-mapped addresses (GH-123419) (GH-135087)
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>
2025-06-03 16:03:49 +02:00
Miss Islington (bot)
da3755557a
[3.11] gh-128840: Limit the number of parts in IPv6 address parsing (GH-128841) (GH-134613)
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>
2025-06-03 15:55:00 +02:00
Miss Islington (bot)
f38f9cf7f8
[3.11] gh-87799: Improve the textual representation of IPv4-mapped IPv6 addresses (GH-29345) (GH-135080)
Represent IPv4-mapped IPv6 address as xxxd.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: Andrew Svetlov <andrew.svetlov@gmail.com>
2025-06-03 15:43:36 +02:00
Miss Islington (bot)
f8b4421bc5
[3.11] gh-134062: Fix hash collisions in IPv4Network and IPv6Network (GH-134063) (GH-134479)
(cherry picked from commit f3fc0c16e08b317cb201cf1073e934e6909f1251)

Co-authored-by: Mike Salvatore <mike.s.salvatore@gmail.com>
2025-06-02 17:53:12 +02:00
Serhiy Storchaka
73b3040f59
[3.11] gh-133767: Fix use-after-free in the unicode-escape decoder with an error handler (GH-129648) (GH-133944) (GH-134341)
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)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-06-02 17:52:52 +02:00
Pablo Galindo
da1f6c61dd
Python 3.11.12 2025-04-08 15:15:29 +01:00
Seth Michael Larson
553d7069e2
[3.11] gh-131809: Upgrade vendored expat to 2.7.1 (GH-132192) (#132240)
(cherry picked from commit c0de6500249469e6fc5b458d6afb6bad1b6755cd)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-04-08 11:36:51 +02:00
Seth Michael Larson
ba49eab9aa
[3.11] gh-131261: Update libexpat to 2.7.0 (CVE-2024-8176) (GH-131272) (GH-131362)
(cherry picked from commit bb0268f60dfe903a9bdb8d84104247a9318c6b18)
(cherry picked from commit 6af54d298d5135302037cdda7a1f5535e48cb1b6)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-04-03 18:32:11 +02:00
Miss Islington (bot)
0a66052d8d
[3.11] gh-121284: Fix email address header folding with parsed encoded-word (GH-122754) (GH-131405)
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>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-04-03 18:27:02 +02:00
Victor Stinner
4588712773
[3.11] gh-127257: ssl: Raise OSError for ERR_LIB_SYS (GH-127361) (GH-127905) (GH-131970)
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>
2025-04-03 18:25:51 +02:00
Diego Russo
6b37486184
[3.11] gh-106883 Fix deadlock in threaded application (#117332)
When using threaded applications, there is a high risk of a deadlock in
the interpreter. It's a lock ordering deadlock with HEAD_LOCK(&_PyRuntime); and the GIL.

By disabling the GC during the _PyThread_CurrentFrames() and
_PyThread_CurrentExceptions() calls fixes the issue.
2025-03-11 15:31:03 +00:00
Miss Islington (bot)
3abcace681
[3.11] gh-119511: Fix a potential denial of service in imaplib (GH-119514) (#129357)
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>
2025-02-19 14:16:30 +01:00
Miss Islington (bot)
526617ed68
[3.11] gh-105704: Disallow square brackets ([ and ]) in domain names for parsed URLs (GH-129418) (#129528)
Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-02-19 14:13:52 +01:00
Miss Islington (bot)
7cff053efe
[3.11] gh-80222: Fix email address header folding with long quoted-string (GH-122753) (#129009)
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 5aaf41685834901e4ed0a40f4c055b92991a0bb5)

Co-authored-by: Mike Edmunds <medmunds@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-02-19 14:12:34 +01: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 40a4d88a14c741172a158683c39d232c587c6f11)

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

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

(cherry-picked from e349f73a5ad2856b0a7cbe4aef7cc081c7aed777)

* 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
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 76a1c5d18312712baed4699fe7333abb050ec9b7)

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 3c9996909402fadc98e6ca2a64e75a71a7427352)
2024-12-03 17:42:23 +01: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 56b00f4705634af2861a8aa9c2eb5769012220f0)

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