Commit graph

12876 commits

Author SHA1 Message Date
Miss Islington (bot)
668163865c
[3.12] gh-85453: Consistent backquotes on None occurences across datetime.rst (GH-118282) (#118419)
(cherry picked from commit 0f797402bc)

Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
2024-04-30 10:44:23 +02:00
Miss Islington (bot)
8e7486f41d
[3.12] gh-118359: Improve docs for Bdb.user_call (GH-118368) (#118410)
gh-118359: Improve docs for Bdb.user_call (GH-118368)

The `argument_list` parameter of bdb.Bdb.user_call has been useless for 25 years. It is retained for backwards compatibility, but it will always be None.
(cherry picked from commit 8e4fb5d260)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2024-04-29 21:07:56 +00:00
Miss Islington (bot)
817190c303
[3.12] gh-101100: Fix Sphinx warnings in library/faulthandler.rst (GH-118353) (#118366)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-04-28 12:41:02 -06:00
Jelle Zijlstra
186fbe82f7
[3.12] Fix note in Enum.__new__ docs (GH-118284) (#118325)
(cherry picked from commit 5a4d3df2fa)

Co-authored-by: Philipp A <flying-sheep@web.de>
2024-04-26 16:25:31 -07:00
Miss Islington (bot)
c784b3e8fc
[3.12] gh-85453: Make numeric literals consistent across datetime.rst (GH-118245) (#118248)
Remove code formatting from remaining numeric literals.
(cherry picked from commit 59a4d52973)

Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
2024-04-24 20:27:19 +00:00
Miss Islington (bot)
0049e2bd38
[3.12] gh-85453: Adapt datetime.rst to devguide recommendations for code snippets and variables (GH-118068) (#118244)
Also remove formatting from numeric literals.

(cherry picked from commit 809aa9a682)

Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-04-24 20:02:53 +00:00
Petr Viktorin
f86b17ac51
[3.12] gh-113171: gh-65056: Fix "private" (non-global) IP address ranges (GH-113179) (GH-113186) (GH-118177)
* GH-113171: Fix "private" (non-global) IP address ranges (GH-113179)

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

* GH-65056: Improve the IP address' is_global/is_private documentation (GH-113186)

It wasn't clear what the semantics of is_global/is_private are and, when
one gets to the bottom of it, it's not quite so simple (hence the
exceptions listed).

(cherry picked from commit 2a4cbf17af)
(cherry picked from commit 40d75c2b7f)

---------

Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
2024-04-24 14:29:30 +02:00
Miss Islington (bot)
4d34b7f201
[3.12] Fix typo in py_compile.rst (GH-118102) (GH-118191)
(cherry picked from commit 0d221e9a19)

Co-authored-by: Animesh Kumar <animesh0721@gmail.com>
2024-04-23 17:22:19 +00:00
Miss Islington (bot)
fbe29e639d
[3.12] gh-59215: unittest: restore _top_level_dir at end of discovery (GH-15242) (GH-117508)
* gh-59215: unittest: restore _top_level_dir at end of discovery (GH-15242)
(cherry picked from commit fc5f68e58e)


Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-04-23 12:41:32 +00:00
Miss Islington (bot)
c869f4ed5c
[3.12] gh-118030: Group definitions for ParamSpecArgs and ParamSpecKwargs in typing.rst (GH-118154) (#118155)
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
2024-04-22 15:04:11 +00:00
Miss Islington (bot)
b1e5f2746d
[3.12] gh-115986 Improve pprint documentation accuracy (GH-117403) (#118146)
(cherry picked from commit ceb6038b05)

Co-authored-by: Kerim Kabirov <the.privat33r+gh@pm.me>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-04-22 10:34:48 +00:00
Miss Islington (bot)
6d87cb494b
[3.12] Docs: replace Harry Potter reference with Monty Python (GH-118130) (#118135)
Docs: replace Harry Potter reference with Monty Python (GH-118130)
(cherry picked from commit 1446024124)

Co-authored-by: Clément Robert <cr52@protonmail.com>
2024-04-21 18:10:15 +00:00
Miss Islington (bot)
ecb8e2bdac
[3.12] gh-118100: Improve links in ast.rst (GH-118101) (#118110)
gh-118100: Improve links in `ast.rst` (GH-118101)
(cherry picked from commit 2aa11cca11)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-04-19 18:34:55 +00:00
Alex Waygood
5430f61437
[3.12] gh-114053: Fix bad interaction of PEP-695, PEP-563 and `get_type_hints` (#118009) (#118104)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-04-19 13:41:28 +00:00
Miss Islington (bot)
26c659ecbd
[3.12] gh-87969: Align docs and docstrings with implementation for ctypes' [w]string_at() (GH-25384) (GH-118046)
gh-87969: Align docs and docstrings with implementation for ctypes' [w]string_at() (GH-25384)

The implementation uses 'ptr' for the name of the first parameter of
ctypes.string_at() and ctypes.wstring_at(). Align docs and docstrings
with the naming used in the implementation.

(cherry picked from commit 81a926bd20)

Co-authored-by: Shreyan Avigyan <shreyan.avigyan@gmail.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-04-19 13:23:26 +02:00
Miss Islington (bot)
a0f82dd6cc
[3.12] gh-64588: Clarify the difference between mu and xbar in statistics docs (GH-117333) (#118080)
gh-64588: Clarify the difference between mu and xbar in statistics docs (GH-117333)

Thanks Davin Potts for the clarification idea.
(cherry picked from commit fefd5d9711)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2024-04-19 05:42:35 +00:00
Miss Islington (bot)
859fdee0b6
[3.12] gh-114539: Clarify implicit launching of shells by subprocess (GH-117996) (#118002)
gh-114539: Clarify implicit launching of shells by subprocess (GH-117996)
(cherry picked from commit a4b44d39cd)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-04-17 19:44:38 +01:00
Miss Islington (bot)
e95a535ea2
[3.12] gh-117977: Amend version changed annotation for os.chmod, os.chown, and os.listdir (GH-117978) (#117992)
(cherry picked from commit fccedbda93)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
2024-04-17 15:05:35 +00:00
Miss Islington (bot)
5f4c7cf3f4
[3.12] gh-117945: Fix os.path.ismount() documentation (GH-117947) (#117952)
gh-117945: Fix `os.path.ismount()` documentation (GH-117947)
(cherry picked from commit a23fa3368e)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
2024-04-16 23:02:13 +00:00
Hugo van Kemenade
eb0bfb5910
[3.12] Docs: add link roles with Sphinx extlinks (GH-117850) (#117910)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-04-15 13:18:21 -06:00
Nice Zombies
2dcb267324
[3.12] gh-117114: Update os.path function availability and link to genericpath.py in os.path.rst (GH-117756) 2024-04-15 15:49:44 +01:00
Miss Islington (bot)
a00dd31ee7
[3.12] Doc: mark up classes, attributes, parameters, and methods in dataclasses.rst (GH-117820) (#117877)
(cherry picked from commit e01831760e)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-04-14 17:00:00 +00:00
Miss Islington (bot)
1bf2d4be7e
[3.12] Tweak wording for dataclasses.replace (gh-117758) (#117876)
(cherry picked from commit e7cce2a9c6)

Co-authored-by: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com>
2024-04-14 16:52:44 +00:00
Miss Islington (bot)
b6cb36574d
[3.12] dataclasses docs: add some link anchors (GH-117601) (#117863)
dataclasses docs: add some link anchors (GH-117601)
(cherry picked from commit c99d374fc7)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-04-14 08:10:07 +00:00
Miss Islington (bot)
efeb8a24b8
[3.12] Simpler example of shallow dict export of a dataclass (GH-117812) (#117862)
Simpler example of shallow dict export of a dataclass (GH-117812)
(cherry picked from commit f303651b45)

Co-authored-by: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com>
2024-04-14 00:22:35 +00:00
Miss Islington (bot)
222d16a18c
[3.12] gh-117840: Fix indent to fix shlex syntax highlighting (GH-117843) (#117844)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-04-13 11:37:32 +00:00
Miss Islington (bot)
14cdb0d7a5
[3.12] gh-114466: explicitly define heap invariant (GH-117778) (#117835)
I think the choice of wording in these docs is great and doesn't
need to change. However, it could be useful to explicitly define
this term / the cost of doing so seems relatively low.
(cherry picked from commit 37a4cbd872)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-04-13 07:11:49 +00:00
Hugo van Kemenade
aeb4ac7441
[3.12] Fix version directive indents (GH-117719) (#117810) 2024-04-12 10:41:25 +00:00
Miss Islington (bot)
84fb531fc2
[3.12] gh-104269: Document glob.glob duplicates when using multiple ** patterns (GH-105406) (#117757)
gh-104269: Document `glob.glob` duplicates when using multiple `**` patterns (GH-105406)
(cherry picked from commit c06be6bbb8)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2024-04-11 18:44:46 +01:00
Miss Islington (bot)
a3f1e980c3
[3.12] gh-101549: fix documentation of xml.etree.ElementInclude (GH-101550) (#117754)
Co-authored-by: Mikhail B <55960560+mbel0@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-04-11 14:53:27 +00:00
Miss Islington (bot)
a4541a6080
[3.12] Fix markup of win32_ver in platform.rst (GH-116492) (#117753)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-04-11 14:20:29 +00:00
Miss Islington (bot)
559b25fcc8
[3.12] gh-117360: Clearer wording in os.path.lexists() docs (GH-117679) (#117701)
(cherry picked from commit 73906d5c90)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Zachary Ware <zach@python.org>
2024-04-09 21:11:07 +00:00
Miss Islington (bot)
ced359855e
[3.12] gh-111726: Explicitly close database connections in sqlite3 doctests (GH-111730) (#117630)
(cherry picked from commit a7702663e3)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-04-08 11:59:02 +02:00
Alex Waygood
3734bee764
[3.12] Fix reference in code.rs (#117615) (#117628)
Co-authored-by: Anita Hammer <166057949+anitahammer@users.noreply.github.com>
Fix reference in code.rst (#117615)
2024-04-08 09:18:44 +00:00
Miss Islington (bot)
7374d65376
[3.12] gh-111726: Remove some doctests from sqlite3 docs (GH-117623) (#117625)
* remove load extension doctest since we cannot skip it conditionally
* remove sys.unraisablehook example; using unraisable hooks is not "an
  improved debug experience"

(cherry picked from commit e338e1a4ec)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-04-08 08:18:55 +00:00
Miss Islington (bot)
e9a49c273e
[3.12] gh-111726: Cleanup test files after running sqlite3 doctest (GH-117604) (#117622)
Remove all temporary databases in a dedicated 'testcleanup' step
at the end of the file.
(cherry picked from commit a453f5ef9d)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-04-08 06:42:42 +00:00
Miss Islington (bot)
558b517bb5
[3.12] gh-117074: Update Traversable.joinpath docs to the 3.11+ protocol (GH-117113) (GH-117571)
gh-117074: Update Traversable.joinpath docs to the 3.11+ protocol (GH-117113)
(cherry picked from commit e569f9132b)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-04-05 17:33:52 +02:00
Miss Islington (bot)
663e7bc2ee
[3.12] [doc] Update logging documentation to improve grammar and elucidate an example. (GH-117541) (GH-117542)
(cherry picked from commit df912c913a)
2024-04-04 14:19:10 +01:00
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