Commit Graph

12201 Commits

Author SHA1 Message Date
Miss Islington (bot) 9d7f2705b5
[3.11] gh-107700: [Enum] Document that `EnumType` was added in 3.11 (GH-108260) (#108300)
(cherry picked from commit e8ef0bdd8c)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-08-22 20:33:26 +02:00
Miss Islington (bot) d22ac0c605
[3.11] Docs: align the param spec of sqlite3.Connection methods with the implementation (GH-108285) (#108288)
- no parameters of create_aggregate() are positional-only
- all parameters of create_collation() are positional-only
(cherry picked from commit 893215a4e7)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-08-22 13:28:38 +00:00
Miss Islington (bot) 8e837373ed
[3.11] gh-107845: Fix symlink handling for tarfile.data_filter (GH-107846) (GH-108209)
gh-107845: Fix symlink handling for tarfile.data_filter (GH-107846)

(cherry picked from commit acbd3f9c5c)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Lumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
2023-08-22 10:51:58 +02:00
Erlend E. Aasland cc42182c97
[3.11] gh-107801: Improve the accuracy of io.TextIOWrapper.seek docs (#107933) (#108264)
(cherry picked from commit 7f87ebbc3f)

Clearly document the supported seek() operations:

- Rewind to the start of the stream
- Restore a previous stream position (given by tell())
- Fast-forward to the end of the stream
2023-08-22 08:19:56 +00:00
Miss Islington (bot) 4d4871e715
[3.11] gh-108224: Fix asyncio doc inconsistency (GH-108230) (#108232)
(Spawning subprocesses does not require the event loop to run in the main thread -- only signal handling does.)

(cherry picked from commit 1cc391d9e2)

Co-authored-by: temach <tematibr@gmail.com>
2023-08-21 14:21:26 -07:00
Miss Islington (bot) a372274a9b
[3.11] Docs: document 'manager' and '_log' attrs of logging.Logging (GH-108145) (GH-108189)
(cherry picked from commit f904aa4e1f)
Authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-08-21 11:44:25 +01:00
Erlend E. Aasland e5e87f2306
[3.11] Docs: Fix Sphinx warnings in logging.rst (GH-108139) (#108175)
(cherry picked from commit c735e79afb)

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-08-20 16:40:57 +00:00
Miss Islington (bot) 5af34d2a4e
[3.11] Docs: Fix Sphinx warnings in sys.rst (GH-108106) (#108166)
Docs: Fix Sphinx warnings in sys.rst (GH-108106)

- Mark up named tuple attributes as attributes
- Remove links for external functions
- io.BufferedIOBase has no 'buffer' attribute;
  remove the link and mark up using :attr:`!buffer`
- (Re)format some tables as bullet lists:
  - sys._emscripten_info
  - sys.hash_info
  - sys.int_info
  - sys.thread_info
- In the paragraphs mentioning 'f_trace_lines' and 'f_trace_opcodes',
  add links to the frame objects reference.

(cherry picked from commit 29fa7afef9)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-20 19:22:44 +05:30
Miss Islington (bot) ba6370656f
[3.11] gh-107659: Improve wording of the description of `ctypes.pointer` and `ctypes.POINTER` (GH-107769) (#108164)
gh-107659: Improve wording of the description of `ctypes.pointer` and `ctypes.POINTER` (GH-107769)
(cherry picked from commit beffb30dc7)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2023-08-20 11:05:24 +00:00
Miss Islington (bot) 4c042a36ce
[3.11] gh-107619: Extend functools LRU cache docs with generators and async functions (GH-107934) (#108162)
gh-107619: Extend functools LRU cache docs with generators and async functions (GH-107934)
(cherry picked from commit 1a713eac47)

Co-authored-by: Hadházy Tamás <85063808+Hels15@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2023-08-20 10:39:43 +00:00
Miss Islington (bot) 5d366f28ae
[3.11] gh-107980: fix doc role for asyncio.timeouts (GH-108126) (#108153)
gh-107980: fix doc role for asyncio.timeouts (GH-108126)
(cherry picked from commit a47c13cae5)

Co-authored-by: Tin Tvrtković <tinchester@gmail.com>
2023-08-20 11:12:15 +01:00
Miss Islington (bot) cdb5e9f76f
[3.11] Fix misspellings in sysconfig docs (GH-108156) (#108158)
Fix misspellings in sysconfig docs (GH-108156)
(cherry picked from commit 1dc0c58d2b)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2023-08-20 08:20:57 +00:00
Miss Islington (bot) 49abeb5eb4
[3.11] Docs: Remove links to external C functions and macros in os.rst (GH-108138) (#108144)
(cherry picked from commit c31c61c04e)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-19 17:11:29 +00:00
Erlend E. Aasland e0ca3424ad
[3.11] gh-107801: Improve the accuracy of os.lseek docs (#107935) (#108137)
- name the last parameter *whence*, like it is for seek() methods on
  file objects
- add param docstrings
- structure the valid *whence* params

(cherry picked from commit dd4442c8f5)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-19 13:06:36 +00:00
Miss Islington (bot) 0673d4c762
[3.11] Docs: format sys.float_info properly (GH-108107) (#108131)
Docs: format sys.float_info properly (GH-108107)

- Normalise capitalisation and punctuation
- Use attribute markup for named tuple attributes
- Use :c:macro: markup for C macros
- Use a list for the 'rounds' attribute values
- Use list-table, for better .rst readability
- Remove one unneeded sys.float_info.dig link

(cherry picked from commit ca0c6c1f1e)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-19 10:13:09 +01:00
Miss Islington (bot) 9a70989a6f
[3.11] Docs: emphasise warning and add accurate markups for sys.unraisablehook (GH-108105) (#108110)
(cherry picked from commit cc58ec9724)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-08-18 10:25:08 +00:00
Miss Islington (bot) d6555abfa7
[3.11] gh-107801: Improve the docs of the SEEK_* constants (GH-108099) (#108100)
(cherry picked from commit 02079b010c)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-08-17 20:52:43 +00:00
Miss Islington (bot) b389939be9
[3.11] Docs: Fix Sphinx warnings in io.rst (GH-107903) (#108094)
- Mark up parameter and argument names properly
- If possible, link to docs for methods like `seek`, `tell`, `write`, `read`, etc.

(cherry picked from commit 5c76899dad)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-17 19:29:10 +00:00
Miss Islington (bot) 1482b99061
[3.11] gh-107801: Document SEEK_HOLE and SEEK_DATA (GH-107936) (#108087)
(cherry picked from commit 8a19f225b9)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Antoine Pitrou <antoine@python.org>
2023-08-17 14:22:39 +00:00
Adam Turner b3f7ddd040
[3.11] gh-102215: importlib documentation cleanups (#108056)
(cherry picked from commit 4cd95dce0b)

Co-authored-by: Sam Morris <sam@robots.org.uk>
2023-08-17 09:57:48 -04:00
Miss Islington (bot) e2420c5cae
[3.11] gh-107877: Update logging levels reference table with usage criteria. (GH-107894) (GH-107921)
gh-107877: Update logging levels reference table with usage criteria. (GH-107894)
(cherry picked from commit cc2cf85d03)
2023-08-13 14:43:14 +01:00
Eric Snow 951320e4d0
[3.11] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107753)
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.
2023-08-07 16:17:12 -06:00
Tomas R 880670a34f
[3.11] gh-107442: Document all valid types for ctypes `_as_parameter_` (GH-107443) (#107718)
(cherry picked from commit 6925c578a0)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2023-08-07 16:42:19 +02:00
Miss Islington (bot) 1878419ed8
[3.11] Improve cross-references in `runpy` docs (GH-107673) (#107699)
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-06 21:20:24 +00:00
Miss Islington (bot) b89feac759
[3.11] gh-107662: Switch 'any' and 'anext' in functions.rst (GH-107663) (#107665)
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-05 18:25:21 +01:00
Miss Islington (bot) 623b0d9c59
[3.11] Clarify `Self` interaction with subclasses (GH-107511) (#107549)
Co-authored-by: Alexandru Mărășteanu <alexei@users.noreply.github.com>
2023-08-01 20:31:22 +00:00
Miss Islington (bot) 3de42bbf8c
[3.11] gh-105578: Add more usage examples to `typing.AnyStr` docs (GH-107045) (#107504)
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:07 +00:00
Alex Waygood 357708eee0
[3.11] gh-107422: Remove outdated `TypedDict` example from typing docs (#107436) (#107438)
gh-107422: Remove outdated `TypedDict` example from typing docs (#107436)

Co-authored-by: Rakesh Sabale <102187286+ghubrakesh@users.noreply.github.com>
2023-07-29 17:21:45 +00:00
Miss Islington (bot) 3c1bcae075
[3.11] gh-101100: Sphinx warnings: pick the low hanging fruits (GH-107386) (GH-107418)
(cherry picked from commit f2d07d3289)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-29 09:17:20 +03:00
Miss Islington (bot) c3432523d1
[3.11] gh-107091: Fix some uses of :const: role (GH-107379) (GH-107385)
It is for references, not for literals.
(cherry picked from commit 0aa58fa7a6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-28 10:36:19 +00:00
Miss Islington (bot) 8f0dc1878c
[3.11] gh-106996: Rewrite turtle explanation (GH-107244) (#107336)
Co-authored-by: Daniele Procida <daniele@vurt.org>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-27 08:12:17 +00:00
Miss Islington (bot) 603c5d50e8
[3.11] gh-107091: Fix some uses of :c:type: role (GH-107138) (GH-107313)
(cherry picked from commit 6d5b6e71c8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-27 00:00:36 +03:00
Miss Islington (bot) 35aa6b80a6
[3.11] Document that `os.link()` is not available on Emscripten (GH-104822) (GH-107309)
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:13 -07:00
Wei-Hsiang (Matt) Wang 9fa44d7a30
[3.11] GH-97950: Fix old-style index directive in Doc/library/imp.rst (#107246)
Use new-style index directive ('statement') - library/imp
2023-07-26 08:17:44 +03:00
Miss Islington (bot) 5a89248696
[3.11] gh-106939: document ShareableList nul-strip quirk. (GH-107266) (#107270)
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:18:23 +00:00
Miss Islington (bot) 1bc160947e
[3.11] gh-106996: Add a how-to section to the turtle documentation (GH-107153) (#107234)
Co-authored-by: Daniele Procida <daniele@vurt.org>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-25 12:17:14 +00:00
Erlend E. Aasland b3e600a632
[3.11] gh-106948: Docs: Disable links for C standard library functions, OS utility functions and system calls (#107062) (#107157)
(cherry picked from commit b447e19e72)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-23 23:49:48 +02:00
wulmer c51f766ebb
[3.11] gh-101100: Fix some broken sphinx references (GH-107095). (#107120) 2023-07-23 05:56:09 -06:00
Daniele Procida 6e3a2fb0fe
[3.11] gh-106996: Add the basics of a turtle graphics tutorial (GH-107072) (#107110) 2023-07-23 04:25:23 -06:00
Serhiy Storchaka ec8718dd7c
[3.11] gh-106948: Add standard external names to nitpick_ignore (GH-106949) (#107061)
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)
2023-07-23 11:24:37 +02:00
Miss Islington (bot) 65e40aaed0
[3.11] gh-54738: Add argparse i18n howto (GH-104562) (#107101)
(cherry picked from commit dcd7acb04a)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2023-07-23 11:23:51 +02:00
Miss Islington (bot) 9875b177a9
[3.11] gh-107028: tiny textual changes in logging docs and docstrings (GH-107029) (GH-107066)
(cherry picked from commit 5e5a34ac3a)
2023-07-22 22:12:06 +01:00
Miss Islington (bot) 2895dbd0f6
[3.11] gh-83006: Document behavior of `shutil.disk_usage` for non-mounted filesystems on Unix (GH-107031) (#107048)
(cherry picked from commit 6e5f2235f3)

Co-authored-by: Matthieu Caneill <matthieucan@users.noreply.github.com>
2023-07-22 20:25:15 +02:00
Miss Islington (bot) e5d2a19ac5
[3.11] gh-107008: Document the curses module variables LINES and COLS (GH-107011) (GH-107058)
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:13:38 +03:00
wulmer b71144193b
[3.11] Fix Sphinx warnings in `re` module docs (GH-107044). (#107055)
(cherry picked from commit 149748ea4f)
2023-07-22 17:39:46 +01:00
Miss Islington (bot) c332117b52
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 01:23:31 +09:00
Miss Islington (bot) 755166e864
[3.11] gh-105090: Replace incorrect TLSv1.2 with TLSv1.3 (GH-105404) (#107038)
Co-authored-by: Jocelyn Castellano <admin@malwarefight.gq>
2023-07-22 14:29:54 +00:00
Sebastiaan Zeeff 4f7c23e4df
[3.11] Change non-integral to non-integer in random docs (GH-106975) (#106985) 2023-07-22 02:37:16 -06:00
Serhiy Storchaka b338ac7540
[3.11] gh-106909: Use role :const: for referencing module constants (GH-106910) (GH-106957)
(cherry picked from commit 4b9948617f)
2023-07-21 14:49:57 +03:00
Serhiy Storchaka cc76113cf8
[3.11] gh-106892: Use roles :data: and :const: for referencing module variables (GH-106894) (GH-106955)
(cherry picked from commit d036db728e)
2023-07-21 14:49:21 +03:00