Commit graph

12838 commits

Author SHA1 Message Date
Miss Islington (bot)
52f1fb6f7d
[3.12] Link to the Python type system specification (GH-117400) (#117448)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-04-02 09:29:10 +00:00
Miss Islington (bot)
a4a8af07cf
[3.12] Docs: specify XML document name in xml.etree.elementtree example (GH-24223) (#117429)
(cherry picked from commit 9dae05ee59)

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

Co-authored-by: Matthew Davis <7035647+mdavis-xyz@users.noreply.github.com>
2024-04-01 19:56:36 +00:00
Christopher Chianelli
655c4255fc
[3.12] gh-117339: Use NULL instead of None for LOAD_SUPER_ATTR in dis docs (GH-117343) (GH-117345) 2024-03-29 06:27:16 +08:00
Miss Islington (bot)
293a479950
[3.12] Sync main docs and docstring for median_grouped(). (gh-117214) (gh-117241) 2024-03-25 23:56:36 +00:00
Miss Islington (bot)
0c334f627b
[3.12] Minor markup and grammar fixes in the statistics docs (gh-117216) (gh-117218) 2024-03-25 14:33:15 +00:00
Miss Islington (bot)
193a24bb80
[3.12] GH-115986 Docs: promote pprint.pp usage as a default (GH-116614) (#117196)
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:47 -06:00
Miss Islington (bot)
4326e07a8b
[3.12] gh-101760: Improve the imaplib.IMAP4 example (GH-101764) (#117191)
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:09:08 +00:00
Carol Willing
1d0e22e500
[3.12] docs:fix over-linking in dataclasses.rst (GH-117005) (#117163)
* docs: fix over-linking in dataclasses.rst (#117005)

(cherry picked from commit 0907871d43)

* [3.12] 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 19:12:00 +00:00
infohash
ad0ff86034
[3.12] gh-75988: Fix issues with autospec ignoring wrapped object (GH-115223) (#117119)
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:47:52 +00:00
Miss Islington (bot)
16ce6861e0
[3.12] gh-101100: Fix Sphinx warnings in library/pydoc.rst (GH-116913) (#117037)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-03-19 19:55:30 +00:00
Miss Islington (bot)
216b022922
[3.12] gh-116851: Remove "from ctypes import *" from a ctypes example (GH-116852) (GH-116905)
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:10:10 +00:00
Miss Islington (bot)
ccea6e82da
[3.12] gh-116782: Mention __type_params__ in inspect.getmembers docs (GH-116783) (#116870)
gh-116782: Mention `__type_params__` in `inspect.getmembers` docs (GH-116783)
(cherry picked from commit 16349868d3)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-03-15 15:54:59 +00:00
Miss Islington (bot)
abd079806d
[3.12] gh-90095: Ignore empty lines and comments in .pdbrc (GH-116834) (#116854)
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:52:00 +00:00
Miss Islington (bot)
37514111be
[3.12] gh-116842: Improve test comment and fix a doctest (gh-116846) (gh-116847) 2024-03-15 02:46:54 +00:00
Raymond Hettinger
e4ec445926
[3.12] Minor improvements to the itertools documentation (gh-116833) (gh-116838) 2024-03-14 19:41:38 -05:00
Miss Islington (bot)
592c0e26c0
[3.12] Better presentation order for recipes. (gh-116755) (gh-116757) 2024-03-13 20:12:09 +00:00
Miss Islington (bot)
0cca76243c
[3.12] gh-98731: Improvements to the logging documentation (GH-101618) (GH-116734)
(cherry picked from commit 7f418fb111)
2024-03-13 17:16:48 +00:00
Miss Islington (bot)
e5c1456bbd
[3.12] Modernize roundrobin() recipe and improve variable names (gh-116710) (gh-116711) 2024-03-13 07:19:12 +00:00
Miss Islington (bot)
982ff4a4b7
[3.12] Docs: fix broken links (GH-116651) (#116700)
(cherry picked from commit 3f1b6efee9)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2024-03-12 21:37:38 -07:00
Miss Islington (bot)
9f38686f62
[3.12] Minor clarity improvement for the iter_index() recipe. Also add value subsequence tests. (gh-116696) (gh-116698) 2024-03-13 02:40:31 +00:00
Miss Islington (bot)
817ccac17c
[3.12] Beef-up tests for the itertool docs. (gh-116679) (gh-116688) 2024-03-12 22:26:32 +00:00
Miss Islington (bot)
0d5455fc7f
[3.12] gh-116535: Fix distracting "TypeError" in example code (gh-116538) (gh-116551)
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:12 -05:00
Miss Islington (bot)
d38298a9ba
[3.12] GH-116218 Docs: Add availability information for the 'resource' module (GH-116256) (#116533)
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:35:01 +01:00
Miss Islington (bot)
d5d86e2145
[3.12] gh-105535 Document potential performance trap during enum creation (GH-107119) (GH116511)
(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:56:58 -08:00
Serhiy Storchaka
1e75fe1468
[3.12] gh-115664: Fix ordering of more versionadded and versionchanged directives (GH-116298) (GH-116450)
(cherry picked from commit 808a77612f)
2024-03-07 08:21:25 +00:00
Sebastian Pipping
0a01ed6c2a
[3.12] gh-115398: Expose Expat >=2.6.0 reparse deferral API (CVE-2023-52425) (GH-115623) (GH-116248)
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 .

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

(cherry picked from commit 6a95676bb5)
(cherry picked from commit 73807eb634)
(cherry picked from commit eda2963378)

---------

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 22:01:45 +00:00
Miss Islington (bot)
23a9ba45ae
[3.12] gh-115986: Fix inaccuracies in pprint docs (GH-116104) (#116382)
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:51 +00:00
Terry Jan Reedy
84b023d243
[3.12] chore: fix typos (#116345) (#116370)
Co-authored-by: cui fliter <imcusg@gmail.com>
(cherry picked from commit e7ba6e9dbe)
2024-03-05 18:51:17 +00:00
Miss Islington (bot)
0f5cd44e1c
[3.12] gh-115777: Fix double versionadded directives (GH-116269) (GH-116361)
(cherry picked from commit 0064dfa091)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-05 16:00:40 +00:00
Miss Islington (bot)
0a9356ce6d
[3.12] Consistently spell out *predicate* instead of *pred*. (gh-116308) (gh-116312) 2024-03-04 16:18:52 +00:00
AN Long
eb0603b855
gh-104711: Add security warning to the CGIHTTPRequestHandler document (GH-115915)
(cherry picked from commit dac8ff4c40)
2024-03-04 11:54:38 +00:00
Miss Islington (bot)
e95e837541
[3.12] gh-116281: Remove wrong '\' from '\*' in some doc signatures (GH-116282) (#116285)
gh-116281: Remove wrong '\' from '\*' in some doc signatures (GH-116282)
(cherry picked from commit 4859ecb860)

Co-authored-by: HarryLHW <123lhw321@gmail.com>
2024-03-03 14:42:22 -05:00
Miss Islington (bot)
16be4a3b93
[3.12] gh-116035: Document that both tzinfo and fold are ignored in comparisons if tzinfo is the same (GH-116187) (GH-116216)
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:17 +02:00
Miss Islington (bot)
753b6644e3
[3.12] gh-115811: Update documentation to add some Logger attributes. (GH-116109) (GH-116185)
(cherry picked from commit 3b6f4cadf1)
2024-03-01 08:57:30 +00:00
Shantanu
2cf68dbe29
[3.12] gh-115881: Document feature_version limitations (#115980) (#116173) 2024-03-01 01:56:06 +00:00
Miss Islington (bot)
8d865f19bd
[3.12] Fix rendering of null character in ast.rst (GH-116080) (#116160)
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:25 +00:00
Miss Islington (bot)
811f4bd5a7
[3.12] gh-73580: Docs for tunnelling TLS through TLS (GH-22539) (GH-116149)
(cherry picked from commit 91c3c64237)

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

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-02-29 20:53:51 +00:00
Miss Islington (bot)
010aac7c1a
[3.12] Make the iter_except() recipe more compact. (gh-116132) (gh0116133) 2024-02-29 17:37:00 +00:00
Miss Islington (bot)
31462d4de2
[3.12] gh-115937: Remove implementation details from inspect.signature() docs (GH-116086) (#116106)
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:36 -08:00
Miss Islington (bot)
d4a1c8e628
[3.12] Update an out-of-date example in the itertools recipe intro (gh-116082) (gh-116084) 2024-02-28 17:19:17 -06:00
Ethan Furman
83ff92d225
[3.12] gh-115821: [Enum] better error message for calling super().__new__() (GH-116065)
Add note to not call super().__new__() in docs.
2024-02-28 15:17:20 -08:00
Miss Islington (bot)
a85e512699
[3.12] Improve all_equal() recipe (gh-116081) (gh-116083) 2024-02-28 17:11:46 -06:00
Miss Islington (bot)
91e680b85c
[3.12] GH-115986 Reorder pprint docs and amend some references (GH-116019) (#116061)
GH-115986 Reorder pprint docs and amend some references (GH-116019)

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.
(cherry picked from commit 6c1c94dc51)

Co-authored-by: Kerim Kabirov <39376984+Privat33r-dev@users.noreply.github.com>
2024-02-28 21:06:08 +01:00
Miss Islington (bot)
9df6d1e033
[3.12] doc: Use super() in subclassed JSONEncoder examples (GH-115565) (GH-116047)
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:13:08 +00:00
Miss Islington (bot)
96f98d9777
[3.12] gh-115315: Update time.rst to include microseconds field (%f) in chart (GH-115316) (#115990)
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:17 +02:00
Miss Islington (bot)
79061af448
[3.12] gh-115091: Remove a left-over sentence that refers to Py_OptimizeFlag from ctypes documentation (GH-115092) (GH-115936)
Remove a left-over sentence that refers to an example that was present in Python 3.10 and was using ``Py_OptimizeFlag``.
(cherry picked from commit 915d7dd090)

Co-authored-by: Antti Haapala <antti.haapala@interjektio.fi>
2024-02-26 11:09:14 +01:00
Miss Islington (bot)
daa28d7552
[3.12] Doc: Clarify the return type of Event.wait when timeout is used (GH-104168) (GH-115938)
(cherry picked from commit 37f5d06b1b)

Co-authored-by: Phil Elson <pelson.pub@gmail.com>
2024-02-26 09:59:26 +00:00
Miss Islington (bot)
f1b3b346eb
[3.12] gh-115921: Change 'equation' to 'expression' in random.rst (GH-115927) (#115928)
In uniform function entry.
(cherry picked from commit de0b4f95cb)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-02-26 03:57:09 +00:00