25231 Commits

Author SHA1 Message Date
Seth Michael Larson
7852d72b65
[3.10] gh-143919: Reject control characters in http cookies (#144094)
(cherry picked from commit 95746b3a13a985787ef53b977129041971ed7f70)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2026-01-25 17:05:23 +00:00
Sebastian Pipping
1173f8068b
[3.10] gh-90949: add Expat API to prevent XML deadly allocations (CVE-2025-59375) (GH-139234) (#139532)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-11-25 15:25:12 +00:00
Serhiy Storchaka
3a623c6c55
[3.10] gh-137836: Support more RAWTEXT and PLAINTEXT elements in HTMLParser (GH-137837) (GH-140842) (GH-140853)
(cherry picked from commit a17c57eee5b5cc81390750d07e4800b19c0c3084)
(cherry picked from commit 0329bd11c7e98484727bbb9062d53a8fa53ac7fd)
2025-10-31 17:55:58 +01:00
Adam Turner
9104fc6cdf
[3.10] gh-139436: Remove `dist-pdf` from the docs archives rebuild target (GH-139437) (GH-140412)
(cherry picked from commit 0e2cdd313ba5c67c5e2e21d993399b890e687c63)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-10-31 14:14:36 +01:00
Adam Turner
f610f9eab9
[3.10] Remove link to the PDF downloads (GH-139142) (#139431) 2025-09-29 21:44:38 +01:00
Pablo Galindo
88663ef89b
Python 3.10.18 2025-06-03 19:23:41 +01:00
T. Wouters
9c1110ef66
[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>
2025-06-03 19:02:29 +02:00
Hugo van Kemenade
457b2cac73
[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>
2025-02-19 14:19:52 +01:00
Adam Turner
1d4db86b4d
[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>
2025-02-13 01:39:02 +00:00
Petr Viktorin
7b0351cf6a
[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>
2025-02-13 01:31:51 +00:00
Petr Viktorin
8773554b71
[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
2024-12-13 22:00:34 +00:00
Petr Viktorin
2a9273a0e4
[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>
2024-09-06 13:14:22 +02:00
Łukasz Langa
06f28dc236
[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>
2024-09-04 17:38:31 +02:00
Łukasz Langa
d86ab5dde2
[3.10] gh-121957: Emit audit events for python -i and python -m asyncio (GH-122119) 2024-07-22 13:48:50 +02:00
Steve Dower
c8f868dc52
[3.10] gh-118486: Support mkdir(mode=0o700) on Windows (GH-118488) (GH-118740)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-05-24 19:26:44 +02:00
Petr Viktorin
c62c9e518b
[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>
2024-05-07 11:56:13 +02:00
Miss Islington (bot)
9b33629f96
[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>
2024-05-07 10:47:46 +02:00
Sebastian Pipping
516a6d4237
[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>
2024-03-07 00:02:55 +01:00
Miss Islington (bot)
b612ec6b19
[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>
2024-02-21 12:43:27 +01:00
Łukasz Langa
c3108e1214
[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>
2024-02-06 19:53:23 +01:00
Adam Turner
6661b228ba
[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>
2024-01-17 14:50:24 +01:00
Miss Islington (bot)
7d445511f8
[3.10] gh-107845: Fix symlink handling for tarfile.data_filter (GH-107846) (#108210) 2023-08-22 18:02:30 +01:00
Eric Snow
917439d4d9
[3.10] gh-98154: Clarify Usage of "Reference Count" In the Docs (#107754) 2023-08-11 13:41:56 +00:00
Miss Islington (bot)
a9e5e59b7d
[3.10] gh-105090: Replace incorrect TLSv1.2 with TLSv1.3 (GH-105404) (#107039)
Co-authored-by: Jocelyn Castellano <admin@malwarefight.gq>
2023-07-22 16:30:09 +02:00
Miss Islington (bot)
f91dfdf5ff
[3.10] gh-105993: Add possible None return type to asyncio.EventLoop.start_tls docs (GH-105995) (#106190)
(cherry picked from commit 6b52a581c151914e59c8c367a03bc7309713a73b)

Co-authored-by: Sam Bull <git@sambull.org>
2023-07-05 13:21:19 +02:00
Miss Islington (bot)
1851443157
[3.10] [3.11] Add single value agen.athrow(value) signature to the 3.11 docs gh-105269 (GH-105468) (#105480)
(cherry picked from commit acf3916e84158308660ed07c474a564e045d6884)

Co-authored-by: Federico Caselli <CaselIT@users.noreply.github.com>
2023-07-05 13:18:39 +02:00
Miss Islington (bot)
45de31db9c
[3.10] Clarify the supported cases in the tokenize module (GH-105569) (#105575)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-06-09 16:00:59 +00:00
Miss Islington (bot)
b7fd286c3b
[3.10] gh-89412: Add missing attributes (added in 3.10) to traceback module docs (GH-105046) (#105329)
(cherry picked from commit a4f72fa39a9d391c7b931ba1906d81da4ae01949)

Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-06-05 19:02:31 +02:00
Miss Islington (bot)
f12502b2b3
[3.10] gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185) (#105220)
(cherry picked from commit ee26ca13a129da8cf549409d0a1b2e892ff2b4ec)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-06-05 18:06:43 +02:00
Miss Islington (bot)
f48a96a280
[3.10] [3.11] gh-102153: Start stripping C0 control and space chars in urlsplit (GH-102508) (GH-104575) (#104592)
gh-102153: Start stripping C0 control and space chars in `urlsplit` (GH-102508)

`urllib.parse.urlsplit` has already been respecting the WHATWG spec a bit GH-25595.

This adds more sanitizing to respect the "Remove any leading C0 control or space from input" [rule](https://url.spec.whatwg.org/GH-url-parsing:~:text=Remove%20any%20leading%20and%20trailing%20C0%20control%20or%20space%20from%20input.) in response to [CVE-2023-24329](https://nvd.nist.gov/vuln/detail/CVE-2023-24329).

I simplified the docs by eliding the state of the world explanatory
paragraph in this security release only backport.  (people will see
that in the mainline /3/ docs)

---------

(cherry picked from commit 2f630e1ce18ad2e07428296532a68b11dc66ad10)
(cherry picked from commit 610cc0ab1b760b2abaac92bd256b96191c46b941)

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
2023-05-17 16:06:06 -07:00
Matěj Cepl
425065bb00
[3.10] gh-102950: Implement PEP 706 – Filter for tarfile.extractall (GH-102953) (GH-104128)
- Backport b52ad18a766700be14382ba222033b2d75a33521
- Backport c8c3956d905e019101038b018129a4c90c9c9b8f
- Remove the DeprecationWarning
- Adjust docs
- Remove new `__all__` entries

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2023-05-10 13:43:00 +02:00
Miss Islington (bot)
18d825be8c
gh-102899: Fix doc link for getting filesystem error handler (GH-102901)
(cherry picked from commit fdd0fff277a55c010a4da0a7af0e986e38560545)

Co-authored-by: Olivier Gayot <olivier.gayot@sigexec.com>
2023-04-05 08:03:45 -07:00
Miss Islington (bot)
8693ec214c
gh-81762: Clarify and simplify description of print's flush param (GH-103264)
(cherry picked from commit c396b6ddf3da784349bac9ebf7f28c55bde016ea)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-04-05 04:24:43 -07:00
Miss Islington (bot)
d76a5c6f7b
Improve some grammar in the socket docs (GH-103254)
(cherry picked from commit bceb9e00ad2998e5193ad5b477e92a114dd31024)

Co-authored-by: Tim Burke <tim.burke@gmail.com>
2023-04-04 15:55:11 -07:00
Miss Islington (bot)
9a8ce95748
gh-103109: Document ignore_warnings() test support helper (GH-103110)
(cherry picked from commit 32937d6aa414ec7db5c63ef277f21db1880b3af4)

Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-04-02 15:38:58 -07:00
Miss Islington (bot)
d58ff6a616
Minor docs improvements fix for codeop (GH-103123)
(cherry picked from commit c1e71ce56fdb3eab62ad3190d09130f800e54610)

Co-authored-by: gaogaotiantian <gaogaotiantian@hotmail.com>
2023-03-30 15:58:36 -07:00
Miss Islington (bot)
ba755a245b
gh-103099: Link mypy docs from typing.rst (GH-103100)
(cherry picked from commit fda95aa19447fe444ac2670afbf98ec42aca0c6f)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-03-30 01:41:04 -07:00
Miss Islington (bot)
473fd7bbf0
[3.10] gh-102582: Fix invalid JSON in Doc/howto/logging-cookbook.rst (GH-102635) (GH-103107)
(cherry picked from commit d835b3f05de7e2d800138e5969eeb9656b0ed860)
Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
2023-03-29 10:05:29 +01:00
Miss Islington (bot)
ae8a721c2b
Update pdb docs for arguments (GH-102965)
(cherry picked from commit 027223db96b0464c49a74513f82a1bf25aa510bd)

Co-authored-by: gaogaotiantian <gaogaotiantian@hotmail.com>
2023-03-25 14:38:26 -07:00
Miss Islington (bot)
db5bf52469
[3.10] gh-103025: fix a ctypes doc typo (GH-103026) (#103030)
* gh-103025: fix two ctypes doc issues  (GH-103026)
(cherry picked from commit 0708437ad043657f992cb985fd5c37e1ac052f93)
2023-03-25 10:00:03 +00:00
Hugo van Kemenade
7513c6b6fe
[3.10] gh-101100: Document PyObject_ClearWeakRefs and gzip's name (#103002) 2023-03-25 09:44:05 +02:00
Miss Islington (bot)
cbffc3ad38
gh-102873: logging.LogRecord docs: improve description of msg parameter (GH-102875)
(cherry picked from commit f2e5a6ee628502d307a97f587788d7022a200229)

Co-authored-by: Amin Alaee <mohammadamin.alaee@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-03-24 08:07:46 -07:00
Miss Islington (bot)
0a2b63f6ad
[3.10] gh-96931: Fix incorrect results in ssl.SSLSocket.shared_ciphers (GH-96932) (#102919)
gh-96931: Fix incorrect results in ssl.SSLSocket.shared_ciphers (GH-96932)
(cherry picked from commit af9c34f6ef8dceb21871206eb3e4d350f6e3d3dc)

Co-authored-by: Benjamin Fogle <benfogle@gmail.com>
2023-03-24 13:33:32 +01:00
Miss Islington (bot)
77e54fe98a
gh-98239: Document that inspect.getsource() can raise TypeError (GH-101689)
(cherry picked from commit b6132085ca5418f714eff6e31d1d03369d3fd1d9)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-03-23 12:41:50 -07:00
Miss Islington (bot)
6c667d025a
gh-102936: typing: document performance pitfalls of protocols decorated with @runtime_checkable (GH-102937)
(cherry picked from commit 58d2b30c012c3a9fe5ab747ae47c96af09e0fd15)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-03-23 11:28:11 -07:00
Miss Islington (bot)
3c2a7bb6b5
Docs: improve accuracy of sqlite3.Connection.interrupt() (GH-102904)
(cherry picked from commit 7b2d53daccf5a6479e179535068fd9a841db44fc)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-03-22 04:59:56 -07:00
Miss Islington (bot)
2e0505a1d9
Docs: improve the accuracy of the sqlite3.connect() timeout param (GH-102900)
(cherry picked from commit c24f1f1e874c283bb11d8b9fbd661536ade19fe9)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-03-22 04:49:32 -07:00
Miss Islington (bot)
00b50606c0
Docs: improve accuracy of pdb alias example (GH-102892)
(cherry picked from commit e0c63b72671bf816d3073f1a6a9107f6c171cae7)

Co-authored-by: gaogaotiantian <gaogaotiantian@hotmail.com>
2023-03-22 04:41:54 -07:00
Miss Islington (bot)
eaafea86a0
gh-102595: Document PyObject_Format c-api function (GH-102596)
(cherry picked from commit 910a64e3013bce821bfac75377cbe88bedf265de)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Def: 5ffdaf748d/Include/abstract.hGH-L389
2023-03-22 02:32:08 -07:00
Miss Islington (bot)
21b94028ef
Add link to sys.exit function documentation (GH-102805)
* Add link to `sys.exit` function documentation

* Update Doc/library/os.rst

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>

* Update Doc/library/os.rst

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>

---------

(cherry picked from commit 41ef502d740b96ca6333a2d0202df7cce4a84e7d)

Co-authored-by: David Poirier <1152277+david-poirier@users.noreply.github.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-03-21 15:05:32 -07:00