Commit graph

26876 commits

Author SHA1 Message Date
Miss Islington (bot)
851821d871
[3.11] gh-100117: Fix inaccuracy in documentation of the CodeObject's co_positions field. (GH-119364) (#119871)
(cherry picked from commit 015b1fdd0a)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-09-04 18:06:13 +02:00
Łukasz Langa
f7c0f09e69
[3.11] gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233) (#122608)
Per RFC 2047:

> [...] these encoding schemes allow the
> encoding of arbitrary octet values, mail readers that implement this
> decoding should also ensure that display of the decoded data on the
> recipient's terminal will not cause unwanted side-effects

It seems that the "quoted-word" scheme is a valid way to include
a newline character in a header value, just like we already allow
undecodable bytes or control characters.
They do need to be properly quoted when serialized to text, though.

Verify that email headers are well-formed.

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

(cherry picked from commit 0976339818)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Bas Bloemsaat <bas@bloemsaat.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-09-04 17:37:28 +02:00
Miss Islington (bot)
b39636047b
[3.11] gh-114539: Clarify implicit launching of shells by subprocess (GH-117996) (#118003)
Co-authored-by: Steve Dower <steve.dower@python.org>
2024-08-09 16:57:50 +03:00
Łukasz Langa
d542a9be51
[3.11] gh-121957: Emit audit events for python -i and python -m asyncio (GH-122118) 2024-07-22 13:44:55 +02:00
Miss Islington (bot)
1b0e63c81b
[3.11] gh-112346: Document the OS byte in gzip.compress output change in 3.11 (GH-120480) (#120614) 2024-06-17 19:01:59 +01:00
Steve Dower
35c799d791
[3.11] gh-118486: Support mkdir(mode=0o700) on Windows (GH-118488) (GH-118739) 2024-05-24 02:13:18 +02:00
Petr Viktorin
ba431579ef
[3.11] gh-113171: gh-65056: Fix "private" (non-global) IP address ranges (GH-113179) (GH-113186) (GH-118177) (#118227) 2024-04-25 13:45:48 +01:00
Miss Islington (bot)
5b547de1f7
[3.11] Docs: specify XML document name in xml.etree.elementtree example (GH-24223) (#117430)
(cherry picked from commit 9dae05ee59)

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

Co-authored-by: Matthew Davis <7035647+mdavis-xyz@users.noreply.github.com>
2024-04-01 19:58:28 +00:00
Miss Islington (bot)
d1610610c1
[3.11] Change links on the index page (GH-117230) (#117269)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2024-03-26 19:14:43 +00:00
Miss Islington (bot)
e64c7d3e19
[3.11] Add information about negative indexes to sequence datamodel doc (GH-110903) (#117239)
Co-authored by Terry Jan Reedy
(cherry picked from commit c2276176d5)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2024-03-25 22:40:41 +00:00
Miss Islington (bot)
a3a0ce1b2f
[3.11] GH-115986 Docs: promote pprint.pp usage as a default (GH-116614) (#117197)
Co-authored-by: Kerim Kabirov <the.privat33r+gh@pm.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-03-24 09:14:51 -06:00
Miss Islington (bot)
5d12230095
[3.11] gh-101760: Improve the imaplib.IMAP4 example (GH-101764) (#117192)
Co-authored-by: LilKS <1244886+LilKS@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-03-24 10:07:37 +00:00
Miss Islington (bot)
de43ce11cc
[3.11] [docs] Fix typo in docstring and add example to logging cookbook. (GH-117157) (GH-117158)
(cherry picked from commit 00baaa21de)
2024-03-23 10:19:14 +00:00
Carol Willing
cf034ad0f6
[3.11] docs: fix over-linking in dataclasses.rst (GH-117005) (#117164)
* docs: fix over-linking in dataclasses.rst (#117005)

(cherry picked from commit 0907871d43)

* [3.11] docs: fix over-linking in dataclasses.rst (GH-117005)
(cherry picked from commit 0907871d43)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>

---------

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2024-03-22 21:11:57 +00:00
infohash
51da1ddefc
[3.11] gh-75988: Fix issues with autospec ignoring wrapped object (GH-115223) (#117124)
gh-75988: Fix issues with autospec ignoring wrapped object (#115223)

* set default return value of functional types as _mock_return_value

* added test of wrapping child attributes

* added backward compatibility with explicit return

* added docs on the order of precedence

* added test to check default return_value

(cherry picked from commit 735fc2cbbc)
2024-03-22 09:48:41 +00:00
Miss Islington (bot)
2f1806ed8a
[3.11] Fix sort order for "locale encoding" glossary item (GH-115794) (#117103)
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2024-03-20 21:08:18 +00:00
Miss Islington (bot)
7eedaf4a86
[3.11] gh-117058: Update GUI and packaging recommendations for macOS. (GH-117059) (#117082)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2024-03-20 17:52:29 +02:00
Miss Islington (bot)
1de746fc1e
[3.11] docs: announce venv creation before installing packages (GH-117036) (#117039)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2024-03-19 20:03:21 +00:00
Miss Islington (bot)
25c34ce3ed
[3.11] gh-101100: Fix Sphinx warnings in library/pydoc.rst (GH-116913) (#117038)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-03-19 19:55:43 +00:00
Miss Islington (bot)
b027278fa0
[3.11] Update titles and subtitles on landing page template (GH-116914) (#117019)
Update titles and subtitles on landing page template (GH-116914)

* Update titles and subtitles on landing page template

* address review from gvanrossum

* Edits from hugovk review

* Change word order back. Down the road we should split license and history
(cherry picked from commit c514a975ab)

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-03-19 17:52:08 +00:00
Miss Islington (bot)
bb7a6d4707
[3.11] gh-107607: Update comment about utf-8 BOM being ignored (GH-107858) (#117015)
(cherry picked from commit 7f64ae30dd)
Co-authored-by: Terry Jan Reedy tjreedy@udel.edu
2024-03-19 11:59:52 -04:00
Miss Islington (bot)
56cd8740a0
[3.11] gh-116881: Remove erroneous or redundant grammar NULL (GH-116885) (#116952)
In Lexical Analysis f-strings section, NULL in the description
of 'literal character' means '\0'.  In the format_spec grammar
production, it is wrong with that meaning and redundant if
instead interpreted as <nothing>.  Remove it there.
(cherry picked from commit 4e45c6c54a)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-03-18 10:37:42 -04:00
Miss Islington (bot)
fb66087134
[3.11] gh-116851: Remove "from ctypes import *" from a ctypes example (GH-116852) (GH-116906)
It is confusing, because libc is not imported from ctypes,
but defined in previous examples, which already contain the import.
(cherry picked from commit 744c077795)

Co-authored-by: jnchen <caojingchen@live.com>
2024-03-16 13:18:52 +00:00
Miss Islington (bot)
eaefa0b1f7
[3.11] gh-90095: Ignore empty lines and comments in .pdbrc (GH-116834) (#116855)
gh-90095: Ignore empty lines and comments in `.pdbrc` (GH-116834)
(cherry picked from commit a50cf6c3d7)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2024-03-15 09:55:44 +00:00
Miss Islington (bot)
039fd9ec34
[3.11] gh-98731: Improvements to the logging documentation (GH-101618) (GH-116733)
(cherry picked from commit 7f418fb111)
2024-03-13 17:16:28 +00:00
Miss Islington (bot)
1117e7dd1b
[3.11] [doc]: Update cookbook recipe for Qt6. (GH-116719) (GH-116728)
(cherry picked from commit 186af3cf21)
2024-03-13 14:34:09 +00:00
Miss Islington (bot)
76c4ab31c9
[3.11] gh-90300: Fix cmdline.rst (GH-116721) (GH-116725)
* Fix the description of the "-b" option.
* Add references to environment variables for "-s" and "-X dev" options.
(cherry picked from commit 33662d4e01)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-13 13:56:25 +00:00
Miss Islington (bot)
1dcb46104f
[3.11] gh-111307: Update design FAQ 'switch' entry (GH-115899) (#116704)
(cherry picked from commit 43986f5567)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-03-13 07:09:52 -04:00
Mariusz Felisiak
0ebc7925e5
[3.11] Docs: fix broken links (GH-116651) (#116701)
(cherry picked from commit 3f1b6efee9)
2024-03-12 22:00:45 -07:00
Miss Islington (bot)
0917338c78
[3.11] Add typing.NamedTuple in glossary section for named tuples (GH-108327) (#116690)
(cherry picked from commit 149f7f7ae2)

Co-authored-by: Tushar Sadhwani <tushar.sadhwani000@gmail.com>
2024-03-12 22:54:18 +00:00
Miss Islington (bot)
830fbe9b6e
[3.11] gh-116563: Update tutorial error example (GH-116569) (#116625)
There now may be multiple carets pointing at a token
rather than just a character.  Fix the sentence about
possible causes.
(cherry picked from commit 3e45030076)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-03-11 22:11:36 +00:00
Miss Islington (bot)
982f457f6f
[3.11] gh-116535: Fix distracting "TypeError" in example code (gh-116538) (gh-116552)
gh-116535: Fix distracting "TypeError" in example code (gh-116538)
(cherry picked from commit db8f423f58)

Co-authored-by: Declan <5962877+dec1@users.noreply.github.com>
2024-03-09 17:08:23 -05:00
Miss Islington (bot)
b1c77ba1ce
[3.11] GH-116218 Docs: Add availability information for the 'resource' module (GH-116256) (#116534)
GH-116218 Docs: Add availability information for the 'resource' module (GH-116256)

Add availability data to 'resource' module Docs
(cherry picked from commit 03f86b1b62)

Co-authored-by: Kerim Kabirov <39376984+Privat33r-dev@users.noreply.github.com>
2024-03-09 10:36:02 +01:00
Miss Islington (bot)
232b085a01
[3.11] gh-105535 Document potential performance trap during enum creation (GH-107119) (GH-116512)
(cherry picked from commit 601f3a7b33)

Co-authored-by: Nicolas A. Oyarzabal <79150521+nicky-eng@users.noreply.github.com>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-03-08 16:57:16 -08:00
Serhiy Storchaka
e89f2a0be1
[3.11] gh-115664: Fix ordering of more versionadded and versionchanged directives (GH-116298) (GH-116450) (GH-116452)
(cherry picked from commit 1e75fe1468)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 808a77612f)
2024-03-07 08:35:24 +00:00
Sebastian Pipping
fc9da96274
[3.11] gh-115398: Expose Expat >=2.6.0 reparse deferral API (CVE-2023-52425) (GH-115623) (#116268)
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 #115138 (comment) .

- Please treat as a security fix related to CVE-2023-52425.

(cherry picked from commit 6a95676)
(cherry picked from commit 73807eb)
(cherry picked from commit eda2963)

---------

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-06 14:17:02 -08:00
Miss Islington (bot)
8675e7f853
[3.11] gh-115986: Fix inaccuracies in pprint docs (GH-116104) (#116383)
Amend wording after gh-116019 was merged.
(cherry picked from commit e205c5cd8f)

Co-authored-by: Kerim Kabirov <39376984+Privat33r-dev@users.noreply.github.com>
2024-03-05 21:20:59 +00:00
Terry Jan Reedy
f4672e2569
[3.11] chore: fix typos (GH-116345) (#116375)
Co-authored-by: cui fliter <imcusg@gmail.com>
(cherry picked from commit e7ba6e9dbe)
2024-03-05 20:33:59 +00:00
Serhiy Storchaka
c67a4b6bdb
[3.11] Fix the PyGetSetDef documentation (GH-116056) (GH-116368)
(cherry picked from commit df59401108)
2024-03-05 16:26:29 +00:00
Miss Islington (bot)
1b9f0d1f61
[3.11] gh-115777: Fix double versionadded directives (GH-116269) (GH-116362)
(cherry picked from commit 0064dfa091)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-05 16:12:22 +00:00
Hugo van Kemenade
e5595288c9
[3.11] Docs: update using/configure.rst (GH-116274) (#116277) 2024-03-04 13:57:35 -07:00
Miss Islington (bot)
1cc1d0872e
[3.11] GH-116271 Docs: provide clarification for object assignments in the Tutorial section (GH-116283) (#116306)
Co-authored-by: Kerim Kabirov <39376984+Privat33r-dev@users.noreply.github.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-03-04 12:28:21 +00:00
AN Long
b6077aaf12
gh-104711: Add security warning to the CGIHTTPRequestHandler document (GH-115915)
(cherry picked from commit dac8ff4c40)
2024-03-04 11:54:46 +00:00
Terry Jan Reedy
7dfde8423c
[3.11] gh-116281: Remove wrong '\' from '\*' in some doc signatures (GH-116282) (#116289)
gh-116281: Remove wrong '\' from '\*' in some doc signatures (#116282)

(cherry picked from commit 4859ecb860)

Co-authored-by: HarryLHW 123lhw321@gmail.com
2024-03-03 20:32:56 +00:00
Miss Islington (bot)
6c2484bbf1
[3.11] gh-116010: Remove link to deprecated PEP 6 in FAQ guide (GH-116246) (#116287)
Co-authored-by: Iman Tabrizian <iman.tabrizian@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-03-03 19:56:24 +00:00
Miss Islington (bot)
82e7692ca6
[3.11] gh-72971: Clarify the special no-TypeError behavior for equality (GH-110729) (#116255)
(cherry picked from commit 67f742e03a)

Co-authored-by: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com>
2024-03-03 01:56:19 +01:00
Miss Islington (bot)
ac8d995bc6
[3.11] gh-116035: Document that both tzinfo and fold are ignored in comparisons if tzinfo is the same (GH-116187) (GH-116217)
This mostly restores information removed in c12240ed28 (GH-114749).
(cherry picked from commit 05b04903a1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-01 19:26:49 +02:00
Miss Islington (bot)
9eb7ed7121
[3.11] gh-104219: Document that idunders can return NotImplemented (GH-104220) (#116211)
(cherry picked from commit 2713c2abc8)

Co-authored-by: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-03-01 16:09:02 +00:00
Miss Islington (bot)
8813e5a2de
[3.11] gh-115811: Update documentation to add some Logger attributes. (GH-116109) (GH-116186)
(cherry picked from commit 3b6f4cadf1)
2024-03-01 08:58:24 +00:00