Commit graph

26844 commits

Author SHA1 Message Date
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
Shantanu
718172719f
[3.11] gh-115881: Document feature_version limitations (#115980) (#116174) 2024-03-01 01:56:53 +00:00
Miss Islington (bot)
da34d55f7f
[3.11] Fix rendering of null character in ast.rst (GH-116080) (#116161)
Fix rendering of null character in ast.rst (GH-116080)
(cherry picked from commit c04a981ff4)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-02-29 22:42:31 +00:00
Miss Islington (bot)
8014ffda1d
[3.11] gh-73580: Docs for tunnelling TLS through TLS (GH-22539) (GH-116150)
(cherry picked from commit 91c3c64237)

Co-authored-by: Carl Bordum Hansen <carl@bordum.dk>
2024-02-29 21:03:59 +00:00
Miss Islington (bot)
f4efc135b3
[3.11] Docs: mark up NotImplemented using the :data: role throughout the docs (GH-116135) (#116148)
(cherry picked from commit dbe44f150c)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-02-29 20:53:50 +00:00
Miss Islington (bot)
6e328371c5
[3.11] gh-115937: Remove implementation details from inspect.signature() docs (GH-116086) (#116107)
gh-115937: Remove implementation details from inspect.signature() docs (GH-116086)
(cherry picked from commit fb2e17b642)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-02-29 01:54:48 -08:00
Erlend E. Aasland
02bb367748
[3.11] GH-115986 Reorder pprint docs and amend some references (#116019) (#116064)
(cherry picked from commit 6c1c94dc51)

Introduce a new subsubsection, 'Functions', for module level functions,
and place it before the PrettyPrinter class reference.

Also:
- Fix pprint.pprint() references so they properly link to the module
  level function.
- Add links to sys.stdout.

Co-authored-by: Kerim Kabirov <39376984+Privat33r-dev@users.noreply.github.com>
2024-02-28 20:11:12 +00:00
Miss Islington (bot)
f225740211
[3.11] doc: Use super() in subclassed JSONEncoder examples (GH-115565) (GH-116046)
doc: Use super() in subclassed JSONEncoder examples (GH-115565)

Replace calls to `json.JSONEncoder.default(self, obj)`
by `super().default(obj)` within the examples of the documentation.
(cherry picked from commit 647053fed1)

Co-authored-by: Jan Max Meyer <jmm@phorward.de>
2024-02-28 14:08:40 +00:00
Miss Islington (bot)
cccd73dced
[3.11] gh-115315: Update time.rst to include microseconds field (%f) in chart (GH-115316) (#115991)
Co-authored-by: Tahoma Software <bacon@tahoma.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-02-27 15:40:33 +02:00
Miss Islington (bot)
0f7f5a4a6c
[3.11] Doc: Clarify the return type of Event.wait when timeout is used (GH-104168) (GH-115939)
(cherry picked from commit 37f5d06b1b)

Co-authored-by: Phil Elson <pelson.pub@gmail.com>
2024-02-26 09:59:32 +00:00
Miss Islington (bot)
392bc9a3a0
[3.11] gh-101100: Fix Sphinx warnings in whatsnew/2.1.rst (GH-112357) (#115933)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-02-26 06:55:56 +00:00
Miss Islington (bot)
f822070e7a
[3.11] gh-115921: Change 'equation' to 'expression' in random.rst (GH-115927) (#115929)
In uniform function entry.
(cherry picked from commit de0b4f95cb)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-02-26 03:57:48 +00:00
Carol Willing
2110ae80fa
[3.11] gh-101100: Fix broken xrefs in fcntl module doc (GH-115691) (#115925)
* clean up fcntl module doc

* simplify

* a few changes, based on suggestion by CAM-Gerlach

* nitpick ignore for a couple other C functions mentioned in the fcntl module doc

* more changes, especially related to LOCK_* constants

* :data: back to :const:

* Apply suggestions from code review



---------

(cherry picked from commit 84a275c4a2)

Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2024-02-26 01:32:52 +00:00
Miss Islington (bot)
6324d9b485
[3.11] gh-103417: Fix the scheduler example (GH-111497) (GH-115909)
Arguments to enterabs() are specified as Unix time.
If the scheduler use the time.monotonic timer, the code will take
decades to complete.
(cherry picked from commit cb287d3421)

Co-authored-by: mauricelambert <50479118+mauricelambert@users.noreply.github.com>
2024-02-25 14:04:47 +02:00
Hugo van Kemenade
a9f8cf03f1
[3.11] gh-101100: Fix Sphinx warnings in whatsnew/2.0.rst (GH-112351) (#115903)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-02-25 03:19:23 -07:00
Miss Islington (bot)
c0789209c4
[3.11] Add an example of of custom __repr__ (GH-112761) (#115901)
Added to repr entry in Doc/library/functions.rst.

---------

(cherry picked from commit 5770006ffa)

Co-authored-by: Oh seungmin <tmdals179@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-02-25 08:06:37 +00:00
Miss Islington (bot)
92e43aea35
[3.11] Erase some unnecessary quotes on data model doc (GH-113521) (#115897)
Thanks to Pedro Arthur Duarte (pedroarthur.jedi at gmail.com) for help with this bug.

(cherry picked from commit f7455864f2)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2024-02-24 23:30:34 -05:00
Miss Islington (bot)
9daf55e5be
[3.11] gh-115872: Doc: remove obsolete reference to MSI packages (GH-115873) (#115877)
Co-authored-by: partev <petrosyan@gmail.com>
2024-02-24 01:17:36 -07:00
Miss Islington (bot)
7c2e1b2c8f
[3.11] Update http.cookiejar document for cookie object attributes (GH-101885) (#115834)
Update http.cookiejar document for cookie object attributes (GH-101885)
(cherry picked from commit a3859422d1)

Co-authored-by: NewUserHa <32261870+NewUserHa@users.noreply.github.com>
2024-02-23 14:11:09 -08:00
Miss Islington (bot)
5172247e8d
[3.11] gh-54358: Clarify data chunking in pyexpat (GH-31629) (GH-115865)
(cherry picked from commit 462a2fc09d)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Éric Araujo <merwok@netwok.org>
2024-02-23 21:25:38 +02:00
Miss Islington (bot)
de45b8a88b
[3.11] gh-89480: Document the gdb helpers (GH-115657) (GH-115858)
Content adapted from https://devguide.python.org/development-tools/gdb/GH-
and https://wiki.python.org/moin/DebuggingWithGdb.

The original content on the Wiki page came from gdb debug help used by
the Launchpad (https://launchpad.net/) team.
Thanks to Anatoly Techtonik and user `rmf` for substantial improvements to the Wiki page.

The history of the Devguide page follows
(with log entries expanded for major content contributions):

Hugo van Kemenade, Sat Dec 30 21:22:04 2023 +0200
Hugo van Kemenade, Fri Dec 8 12:04:32 2023 +0200
Erlend E. Aasland & Hugo van Kemenade, Tue Aug 8 22:05:34 2023 +0200
Satish Mishra, Sat Feb 11 13:54:57 2023 +0530
Hugo van Kemenade, Fri Dec 23 17:33:33 2022 +0200
Skip Montanaro, Hugo, Erlend, & Ezio, Fri Nov 4 05:04:23 2022 -0500

    Add a GDB tips section to Advanced Tools (GH-977)

Adam Turner, Wed Jun 15 21:19:23 2022 +0100
Adam Turner, Tue Jun 14 11:12:26 2022 +0100
Suriyaa, Fri Jun 8 19:39:23 2018 +0200
Jeff Allen, Tue Oct 24 18:12:53 2017 +0100
Jeff Allen, Fri Oct 13 13:43:43 2017 +0100
Mariatta, Wed Jan 4 09:14:55 2017 -0800
Carol Willing, Mon Sep 26 14:50:54 2016 -0700
Zachary Ware, Thu Jul 21 10:42:23 2016 -0500
Georg Brandl, Mon Nov 3 11:28:19 2014 +0100

    Add instruction how to activate python-gdb.py

Georg Brandl, Sun Mar 9 10:32:01 2014 +0100
Georg Brandl, Tue Apr 3 09:12:53 2012 +0200
Georg Brandl, Sat Mar 5 17:32:35 2011 +0100
Dave Malcolm, Fri Jan 21 12:34:09 2011 -0500

    Add documentation on the gdb extension commands provided in libpython.py

    I adapted this from documentation I wrote for the Fedora wiki:
      https://fedoraproject.org/wiki/Features/EasierPythonDebuggingGH-New_gdb_commands
    reformatting it as rst, and making other minor changes

Brett Cannon, Thu Jan 20 15:16:52 2011 -0800
Dave Malcolm, Thu Jan 20 16:17:23 2011 -0500

    Add some notes on the gdb pretty-printer hooks

Antoine Pitrou, Thu Jan 20 21:17:49 2011 +0100

    Give an example backtrace

Antoine Pitrou, Thu Jan 20 21:03:06 2011 +0100

    Expand explanations about gdb support

Brett Cannon, Thu Jan 20 11:33:36 2011 -0800

    Tweak the gdb support title to fit in better with the devguide.

Brett Cannon, Mon Jan 17 21:12:54 2011 +0000

    Short README on gdb support.

(cherry picked from commit 59057ce55a)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: anatoly techtonik <techtonik@gmail.com>
Co-authored-by: Antoine Pitrou <solipsis@pitrou.net>
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Dave Malcolm <dmalcolm@redhat.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Georg Brandl <georg@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Jeff Allen <ja.py@farowl.co.uk>
Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Satish Mishra <7506satish@gmail.com>
Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
Co-authored-by: Suriyaa <isc.suriyaa@gmail.com>
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>

* Update (downdate?) this to Python 3.11

---------

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: anatoly techtonik <techtonik@gmail.com>
Co-authored-by: Antoine Pitrou <solipsis@pitrou.net>
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Dave Malcolm <dmalcolm@redhat.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Georg Brandl <georg@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Jeff Allen <ja.py@farowl.co.uk>
Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Satish Mishra <7506satish@gmail.com>
Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
Co-authored-by: Suriyaa <isc.suriyaa@gmail.com>
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
2024-02-23 17:34:21 +01:00
Miss Islington (bot)
a0434b21d3
[3.11] gh-115795: Doc: fix obsolete URL (GH-115749) (#115804)
gh-115795: Doc: fix obsolete URL (GH-115749)
(cherry picked from commit 7bc79371a6)

Co-authored-by: partev <petrosyan@gmail.com>
2024-02-22 06:51:43 +00:00
Miss Islington (bot)
35e5bbc845
[3.11] gh-114785: Remove content from Porting from Python2 how-to (GH-114805) (GH-115328)
Keep the page though, because people might still rely on it (the traffic shows that they do).
Instead of our own manual we now give links to the 3rd-party ones.

(cherry picked from commit 705c76d4a2)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-02-21 13:50:07 +01:00
Miss Islington (bot)
6928d5e1f7
[3.11] gh-115399: Document CVE-2023-52425 under "XML vulnerabilities" (GH-115400) (GH-115761)
Doc/library/xml.rst: Document CVE-2023-52425 under "XML vulnerabilities"
(cherry picked from commit fbd40ce46e)

Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
2024-02-21 12:43:16 +01:00
Miss Islington (bot)
5a0d51b629
[3.11] gh-112020: Document the meaning of empty bytes returned by socket.recv() (GH-112055) (GH-115723)
(cherry picked from commit e71468ba4f)

Co-authored-by: talcs <talh8787@gmail.com>
2024-02-20 15:00:30 +00:00
Serhiy Storchaka
c39baf15c5
[3.11] gh-115664: Fix versionadded and versionchanged directives in multiprocessing.rst (GH-115665) (GH-115682)
(cherry picked from commit 8f602981ba)
2024-02-19 20:52:17 +02:00
Brian Schubert
61f2085687
[3.11] gh-115664: Fix chronological ordering of versionadded and versionchanged directives (GH-115676) (#115681)
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
2024-02-19 18:42:19 +00:00
Miss Islington (bot)
f10ce9fede
[3.11] Fix typo in multiprocessing docs (GH-115650) (#115680)
(cherry picked from commit 57d31ec359)

Co-authored-by: Naglis Jonaitis <827324+naglis@users.noreply.github.com>
2024-02-19 18:25:59 +00:00
Miss Islington (bot)
d4915220e7
[3.11] gh-115652: Fix indentation in the documentation of multiprocessing.get_start_method (GH-115658) (GH-115660)
(cherry picked from commit d504968983)

Co-authored-by: Daniel Haag <121057143+denialhaag@users.noreply.github.com>
2024-02-19 17:09:07 +02:00
Miss Islington (bot)
eb759952ee
[3.11] Docs: Add explanation about little/big endian (GH-109841) (#115647)
Docs: Add explanation about little/big endian (GH-109841)
(cherry picked from commit 177b9cb52e)

Co-authored-by: Simon A. Eugster <simon.eu@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-02-19 07:57:00 +00:00
Kirill Podoprigora
c69da47ac9
[3.11] gh-115572: Move codeobject.replace() docs to the data model … (#115632)
* [3.11] gh-115572: Move `codeobject.replace()` docs to the data model (GH-115631)
(cherry picked from commit 0c80da4c14)

Co-authored-by: Daler <48939169+daler-sz@users.noreply.github.com>

* Remove note about copy.replace

---------

Co-authored-by: Daler <48939169+daler-sz@users.noreply.github.com>
2024-02-18 14:37:27 +00:00
Miss Islington (bot)
b87a443146
[3.11] gh-101100: Fix Sphinx warnings in whatsnew/3.2.rst (GH-115580) (#115590)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-02-17 14:51:28 -07:00
Miss Islington (bot)
a6776cdc53
[3.11] Document use of ANY in test assertions (GH-94060) (GH-115608)
(cherry picked from commit 04005f5021)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2024-02-17 13:24:40 +00:00