Commit graph

12442 commits

Author SHA1 Message Date
Miss Islington (bot)
aa2ecef22a
[3.12] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) (#107752)
* gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552)

PEP 683 (immortal objects) revealed some ways in which the Python documentation has been unnecessarily coupled to the implementation details of reference counts.  In the end users should focus on reference ownership, including taking references and releasing them, rather than on how many reference counts an object has.

This change updates the documentation to reflect that perspective.  It also updates the docs relative to immortal objects in a handful of places.
(cherry picked from commit 5dc825d504)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>

* Fix a typo.

---------

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2023-08-08 16:25:35 +02:00
Miss Islington (bot)
e5582bdbcf
[3.12] gh-107442: Document all valid types for ctypes _as_parameter_ (GH-107443) (#107707)
gh-107442: Document all valid types for ctypes _as_parameter_ (GH-107443)
(cherry picked from commit 6925c578a0)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2023-08-07 14:33:25 +02:00
Miss Islington (bot)
ab1988d5a6
[3.12] Improve cross-references in runpy docs (GH-107673) (#107698)
Improve cross-references in `runpy` docs (GH-107673)

- Add links to `__main__` and `sys.path` where appropriate
- Ensure each paragraph never has more than one link to the same thing, to avoid visual clutter from too many links
(cherry picked from commit 4e242d1ffb)

Co-authored-by: Kamil Turek <kamil.turek@hotmail.com>
2023-08-07 00:48:48 +02:00
Miss Islington (bot)
e950d70451
[3.12] Docs: Fix Sphinx annotations in Doc/library/ctypes.rst (GH-107672) (#107685)
Docs: Fix Sphinx annotations in Doc/library/ctypes.rst (GH-107672)
(cherry picked from commit 71a7c96ffe)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-06 22:08:38 +02:00
Miss Islington (bot)
6132f7099d
[3.12] gh-107662: Switch 'any' and 'anext' in functions.rst (GH-107663) (#107664)
gh-107662: Switch 'any' and 'anext' in functions.rst (GH-107663)

Order was reversed in index at top, not in body.
(cherry picked from commit 9ebc6ecbc3)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-08-06 15:14:42 +02:00
Miss Islington (bot)
f7e16d74ad
[3.12] Clarify Self interaction with subclasses (GH-107511) (#107548)
Clarify `Self` interaction with subclasses (GH-107511)
(cherry picked from commit c8872f4285)

Co-authored-by: Alexandru Mărășteanu <alexei@users.noreply.github.com>
2023-08-02 01:52:28 +02:00
Miss Islington (bot)
9f58d9ec90
[3.12] gh-105578: Add more usage examples to typing.AnyStr docs (GH-107045) (#107503)
gh-105578: Add more usage examples to `typing.AnyStr` docs (GH-107045)

``typing.AnyStr`` has different semantics to ``str | bytes``, which often leads to user confusion
(cherry picked from commit f877b32b87)

Co-authored-by: Michael The <michael-the1@users.noreply.github.com>
2023-07-31 15:33:00 +00:00
Miss Islington (bot)
0b3d638175
[3.12] gh-107427: Update the description of UNPACK_SEQUENCE (gh-107429) (gh-107459) 2023-07-30 15:49:26 +00:00
Miss Islington (bot)
2c0a99d322
[3.12] gh-107422: Remove outdated TypedDict example from typing docs (GH-107436) (#107437)
gh-107422: Remove outdated `TypedDict` example from typing docs (GH-107436)
(cherry picked from commit 89fd4f4a3f)

Co-authored-by: Rakesh Sabale <102187286+ghubrakesh@users.noreply.github.com>
2023-07-29 17:12:50 +00:00
Serhiy Storchaka
d514e1439f
[3.12] gh-101100: Sphinx warnings: pick the low hanging fruits (GH-107386) (GH-107419)
(cherry picked from commit f2d07d3289)
2023-07-29 09:16:27 +03:00
Miss Islington (bot)
e5ca2aa2c6
[3.12] gh-107307: Update the importlib Docs for PEP 684 (gh-107400) (gh-107413)
gh-107307: Update the importlib Docs for PEP 684 (gh-107400)
(cherry picked from commit cf63df88d3)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2023-07-28 22:09:34 +00:00
Miss Islington (bot)
0f42f41ea8
[3.12] gh-107091: Fix some uses of :const: role (GH-107379) (GH-107384)
It is for references, not for literals.
(cherry picked from commit 0aa58fa7a6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-28 10:35:20 +00:00
Miss Islington (bot)
38c982d92e
[3.12] gh-106996: Rewrite turtle explanation (GH-107244) (#107335)
Co-authored-by: Daniele Procida <daniele@vurt.org>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-27 08:11:50 +00:00
Miss Islington (bot)
58af565c50
[3.12] Document that os.link() is not available on Emscripten (GH-104822) (GH-107308)
Document that `os.link()` is not available on Emscripten (GH-104822)
(cherry picked from commit 737d1da074)

Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2023-07-26 13:00:40 -07:00
Miss Islington (bot)
da2097dffb
[3.12] gh-107091: Fix some uses of :c:type: role (GH-107138) (GH-107312)
(cherry picked from commit 6d5b6e71c8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-26 19:37:39 +00:00
Miss Islington (bot)
0107731a06
[3.12] gh-106939: document ShareableList nul-strip quirk. (GH-107266) (#107269)
gh-106939: document ShareableList nul-strip quirk. (GH-107266)

* gh-106939: document ShareableList nul-strip quirk.
* Mention the `int` size constraint.
(cherry picked from commit 70dc009469)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-07-25 21:19:25 +00:00
Miss Islington (bot)
fab36fb63e
[3.12] gh-106996: Add a how-to section to the turtle documentation (GH-107153) (#107233)
Co-authored-by: Daniele Procida <daniele@vurt.org>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-25 12:20:30 +00:00
Miss Islington (bot)
40a337fbaa
[3.12] gh-106948: Docs: Disable links for C standard library functions, OS utility functions and system calls (GH-107062) (#107154)
(cherry picked from commit b447e19e72)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-23 23:13:23 +02:00
Daniele Procida
f7e13002ff
[3.12] gh-106996: Add the basics of a turtle graphics tutorial (GH-107072) (#107109) 2023-07-23 04:22:05 -06:00
Miss Islington (bot)
332db37835
[3.12] gh-101100: Fix some broken sphinx references (GH-107095) (#107103)
(cherry picked from commit f5147c0cfb)

Co-authored-by: wulmer <wulmer@users.noreply.github.com>
2023-07-23 12:00:31 +02:00
Miss Islington (bot)
63ae7edd35
[3.12] gh-54738: Add argparse i18n howto (GH-104562) (#107102)
(cherry picked from commit dcd7acb04a)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2023-07-23 11:36:10 +02:00
Serhiy Storchaka
456cf8b097
[3.12] gh-106948: Add standard external names to nitpick_ignore (GH-106949) (#107060)
* [3.12] gh-106948: Add standard external names to nitpick_ignore (GH-106949)

It includes standard C types, macros and variables like "size_t",
"LONG_MAX" and "errno", and standard environment variables like "PATH".

(cherry picked from commit f8b7fe2f26)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

* Delete 2023-05-31-18-37-57.gh-issue-105156.R4El5V.rst
2023-07-23 11:24:51 +02:00
Miss Islington (bot)
52804b3801
[3.12] gh-102111: Add link to string escape sequences in re module (GH-106995) (#107096)
Co-authored-by: wulmer <wulmer@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-23 02:59:16 -06:00
Miss Islington (bot)
bd907dcc50
gh-106847: Add -X warn_default_encoding in sys.flags Doc (GH-106854)
gh-106847: Add -X warn_default_encoding in sys.flags Doc (GH-106854)
(cherry picked from commit fd84ac0ee0)

Co-authored-by: qqwqqw689 <114795525+qqwqqw689@users.noreply.github.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-07-23 06:15:19 +09:00
Miss Islington (bot)
dd431d791f
[3.12] gh-107028: tiny textual changes in logging docs and docstrings (GH-107029) (GH-107065)
(cherry picked from commit 5e5a34ac3a)
2023-07-22 22:11:29 +01:00
Miss Islington (bot)
0fff068181
[3.12] gh-83006: Document behavior of shutil.disk_usage for non-mounted filesystems on Unix (GH-107031) (#107047)
(cherry picked from commit 6e5f2235f3)

Co-authored-by: Matthieu Caneill <matthieucan@users.noreply.github.com>
2023-07-22 20:25:03 +02:00
Miss Islington (bot)
3889d39471
[3.12] gh-107008: Document the curses module variables LINES and COLS (GH-107011) (GH-107057)
LINES and COLS referred in curses.update_lines_cols() documentations are
the module variables, not the environment variables.
(cherry picked from commit 26e08dfdd7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-22 21:12:58 +03:00
Miss Islington (bot)
844bdce712
[3.12] Fix Sphinx warnings in re module docs (GH-107044) (#107046)
Fix Sphinx warnings in `re` module docs (GH-107044)
(cherry picked from commit 149748ea4f)

Co-authored-by: wulmer <wulmer@users.noreply.github.com>
2023-07-22 16:54:02 +01:00
Miss Islington (bot)
c8a0296901
[3.12] gh-105090: Replace incorrect TLSv1.2 with TLSv1.3 (GH-105404) (#107040)
Co-authored-by: Jocelyn Castellano <admin@malwarefight.gq>
2023-07-22 14:30:28 +00:00
Serhiy Storchaka
ffc7678f46
[3.12] gh-106892: Use roles :data: and :const: for referencing module variables (GH-106894) (GH-106954)
(cherry picked from commit d036db728e)
2023-07-21 14:51:00 +03:00
Serhiy Storchaka
84e52171b5
[3.12] gh-106909: Use role :const: for referencing module constants (GH-106910) (GH-106956)
(cherry picked from commit 4b9948617f)
2023-07-21 14:49:39 +03:00
Serhiy Storchaka
ac9aa8a369
[3.12] gh-106919: Use role :c:macro: for referencing the C "constants" (GH-106920) (GH-106951)
(cherry picked from commit fcc816dbff)
2023-07-21 14:48:15 +03:00
Gregory P. Smith
656f62454b
[3.12] gh-106669: Revert "gh-102988: Detect email address parsing errors ... (GH-105127)" (GH-106733) (#106941)
This reverts commit 18dfbd0357.
Adds a regression test from the issue.

See https://github.com/python/cpython/issues/106669..
(cherry picked from commit a31dea1feb)
2023-07-21 04:05:46 +00:00
Miss Islington (bot)
c1fd76e138
[3.12] Fix typo in tkinter docs (GH-106936) (#106937)
Fix typo in tkinter docs (GH-106936)
(cherry picked from commit 60e83968d5)

Signed-off-by: Makonede <61922615+Makonede@users.noreply.github.com>
Co-authored-by: Makonede <61922615+Makonede@users.noreply.github.com>
2023-07-21 00:11:52 +01:00
Miss Islington (bot)
c16cf9b6e5
[3.12] gh-106882: Note that asyncio.Server is only publicly exposed on 3.11+ (GH-106901) (#106902)
gh-106882: Note that `asyncio.Server` is only publicly exposed on 3.11+ (GH-106901)

And later versions of 3.10, 3.9
(cherry picked from commit 1e1f4e91a9)

Co-authored-by: Jack Nelson <jack@jacknelson.xyz>
2023-07-19 21:03:56 +01:00
Miss Islington (bot)
9c00dc02cf
[3.12] Add more recipe tests. Make the factor recipe a bit faster and clearer. (GH-106817) (GH-106818) 2023-07-16 21:47:58 -05:00
Inada Naoki
0afd530505
Doc: fix section levels of devmode doc (GH-106801)
(cherry picked from commit e58960160f)
2023-07-16 21:25:35 +09:00
Miss Islington (bot)
e4658bf44e
Doc: devmode: add -Xdev option to example (GH-106253)
Doc: devmode: add -Xdev option to example (GH-106253)
(cherry picked from commit 83bd568d2b)

Co-authored-by: Simone Rubino <daemo00@gmail.com>
2023-07-16 16:32:26 +09:00
Miss Islington (bot)
18d98bacb6
[3.12] Add more examples to the recipe docs (GH-106782) (GH-106783) 2023-07-15 15:09:20 -05:00
Alex Waygood
e99b69c5ae
[3.12] gh-106745: typing docs: Clarify that removal of PEP-585 aliases is not currently planned (#106748) (#106772) 2023-07-15 11:31:12 +01:00
Miss Islington (bot)
00eb4355e3
[3.12] gh-106446: Fix failed doctest in stdtypes (GH-106447) (#106741)
(cherry picked from commit 89867d2491)

Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-07-14 04:01:35 -04:00
Miss Islington (bot)
e68b280671
[3.12] gh-105626: Change the default return value of HTTPConnection.get_proxy_response_headers (GH-105628) (#106738)
gh-105626: Change the default return value of `HTTPConnection.get_proxy_response_headers` (GH-105628)
(cherry picked from commit 490295d651)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-07-14 07:21:02 +00:00
Yonatan Bitton
ec7b05a0be
[3.12] gh-96747: Mention the PyPI passlib package in the crypt deprecation doc (GH-106660) (#106660)
* Added mention to passlib package as alternative to the deprecated crypt module.
2023-07-12 14:58:51 -07:00
Miss Islington (bot)
e248ba7b72
[3.12] gh-96165: Clarify passing ":memory:" in sqlite3.connect() (GH-106451) (#106647)
(cherry picked from commit f520804b03)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2023-07-11 22:31:48 +02:00
Miss Islington (bot)
bf7e92583d
[3.12] gh-96165: Clarify omitting the FROM clause in SQLite queries (GH-106513) (#106645)
(cherry picked from commit fc7ff1af45)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2023-07-11 22:31:16 +02:00
Miss Islington (bot)
30870c834c
[3.12] gh-102988: Detect email address parsing errors and return empty tuple to indicate the parsing error (old API) (GH-105127) (#106612)
gh-102988: Detect email address parsing errors and return empty tuple to indicate the parsing error (old API) (GH-105127)

Detect email address parsing errors and return empty tuple to indicate the parsing error (old API). This fixes or at least ameliorates CVE-2023-27043.

---------

(cherry picked from commit 18dfbd0357)

Co-authored-by: Thomas Dwyer <github@tomd.tel>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-07-10 23:38:42 +00:00
Miss Islington (bot)
128a962482
[3.12] gh-106461: typing: Consolidate docs on Callable (GH-106462) (#106574)
gh-106461: typing: Consolidate docs on `Callable` (GH-106462)
(cherry picked from commit ca8b55c7f5)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-09 22:21:54 +01:00
Miss Islington (bot)
48f58e0243
[3.12] gh-101880: add link to object.__hash__() in hash() builtin documentation (GH-101883) (#106546)
gh-101880: add link to object.__hash__() in hash() builtin documentation (GH-101883)
(cherry picked from commit ec7180bd1b)

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
2023-07-08 14:22:50 +05:30
Miss Islington (bot)
e229225fba
[3.12] Clarify state of CancelledError in doc (GH-106453) (#106454)
Clarify state of CancelledError in doc (GH-106453)

This change makes it explicit that asyncio.CancelledError is not a subclass of Exception.
(cherry picked from commit 12a9813808)

Co-authored-by: Kristján Valur Jónsson <sweskman@gmail.com>
2023-07-06 16:34:43 +05:30
Miss Islington (bot)
84cda268bd
[3.12] Doc: Add missing ref labels to exception groups/notes sections (GH-106465) (#106473)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-07-05 23:51:30 -06:00