Commit Graph

12542 Commits

Author SHA1 Message Date
Irit Katriel 10a91d7e98
gh-108113: Make it possible to create an optimized AST (#108154) 2023-08-21 16:31:30 +00:00
Petr Viktorin acbd3f9c5c
gh-107845: Fix symlink handling for tarfile.data_filter (GH-107846)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Lumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
2023-08-21 12:56:46 +02:00
Erlend E. Aasland f904aa4e1f
Docs: document 'manager' and '_log' attrs of logging.Logging (#108145)
Authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-20 16:01:10 +00:00
Erlend E. Aasland c735e79afb
Docs: Fix Sphinx warnings in logging.rst (GH-108139)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-08-20 12:19:07 +01:00
Erlend E. Aasland 29fa7afef9
Docs: Fix Sphinx warnings in sys.rst (#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.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-20 13:09:33 +02:00
Tomas R beffb30dc7
gh-107659: Improve wording of the description of `ctypes.pointer` and `ctypes.POINTER` (#107769)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2023-08-20 10:54:06 +00:00
Hadházy Tamás 1a713eac47
gh-107619: Extend functools LRU cache docs with generators and async functions (#107934)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2023-08-20 10:33:15 +00:00
Rafael Fontenelle 1dc0c58d2b
Fix misspellings in sysconfig docs (#108156) 2023-08-20 08:11:39 +00:00
Tin Tvrtković a47c13cae5
gh-107980: fix doc role for asyncio.timeouts (#108126) 2023-08-19 13:14:38 -07:00
Erlend E. Aasland c31c61c04e
Docs: Remove links to external C functions and macros in os.rst (#108138)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-19 17:03:26 +00:00
Erlend E. Aasland ca0c6c1f1e
Docs: format sys.float_info properly (#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

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

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-18 19:53:51 +02:00
Raymond Hettinger 6db39b1460
Minor code clean-up for the factor() recipe (GH-108114) 2023-08-18 12:13:58 -05:00
Victor Stinner 3ff5ef2ad3
gh-108014: Add Py_IsFinalizing() function (#108032)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-18 12:34:41 +02:00
Erlend E. Aasland cc58ec9724
Docs: emphasise warning and add accurate markups for sys.unraisablehook (#108105) 2023-08-18 12:16:22 +02:00
Erlend E. Aasland 02079b010c
gh-107801: Improve the docs of the SEEK_* constants (#108099) 2023-08-17 20:41:35 +00:00
Erlend E. Aasland 5c76899dad
Docs: Fix Sphinx warnings in io.rst (#107903)
- Mark up parameter and argument names properly
- If possible, link to docs for methods like `seek`, `tell`, `write`, `read`, etc.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-17 19:19:01 +00:00
Erlend E. Aasland 8a19f225b9
gh-107801: Document SEEK_HOLE and SEEK_DATA (#107936)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Antoine Pitrou <antoine@python.org>
2023-08-17 16:14:01 +02:00
Adam Turner fbb7cbc0e9
GH-92584: Remove Installing Python Modules (Distutils version) (#108020) 2023-08-16 21:06:56 +00:00
Serhiy Storchaka 882cb79afa
gh-56166: Deprecate passing confusing positional arguments in re functions (#107778)
Deprecate passing optional arguments maxsplit, count and flags in
module-level functions re.split(), re.sub() and re.subn() as positional.
They should only be passed by keyword.
2023-08-16 13:35:35 -07:00
Adam Turner f2a9dfdee9
GH-92584: Drop reference to Distutils in ``site.USER_BASE`` (#108031)
Drop reference to Distutils in ``site.USER_BASE``
2023-08-16 18:10:44 +02:00
Erlend E. Aasland 13c36dc9ae
gh-93057: Deprecate positional use of optional sqlite3.connect() params (#107948) 2023-08-15 08:09:56 +00:00
Romuald Brunet a482e5bf00
gh-76913: Add "merge extras" feature to LoggerAdapter (GH-107292) 2023-08-15 08:23:54 +01:00
Vinay Sajip cc2cf85d03
gh-107877: Update logging levels reference table with usage criteria. (#107894)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-13 14:19:41 +01:00
Raymond Hettinger 2b6dc2accc
Add another example to the statistics docs (GH-107904) 2023-08-13 08:01:23 -05:00
shailshouryya 23a6db98f2
gh-107421: Clarify `OrderedDict` Examples and Recipes (#107613) 2023-08-10 23:43:13 -05:00
Brandt Bucher a9caf9cf90
GH-105848: Simplify the arrangement of CALL's stack (GH-107788) 2023-08-09 18:19:39 +00:00
Raymond Hettinger aab6f7173a
GH-100425: Note improved commutativity in sum(). (GH-107785) 2023-08-08 18:30:33 +01:00
Eric Snow 5dc825d504
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.
2023-08-07 15:40:59 -06:00
Erlend E. Aasland 8c9af6b9a0
Docs: Fix more Sphinx annotations in ctypes.rst (#107708) 2023-08-07 15:11:05 +02:00
Tomas R 6925c578a0
gh-107442: Document all valid types for ctypes _as_parameter_ (#107443) 2023-08-07 12:41:39 +02:00
Kamil Turek 4e242d1ffb
Improve cross-references in `runpy` docs (#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
2023-08-06 21:11:16 +00:00
Erlend E. Aasland 71a7c96ffe
Docs: Fix Sphinx annotations in Doc/library/ctypes.rst (#107672)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-06 10:23:50 +02:00
Terry Jan Reedy 9ebc6ecbc3
gh-107662: Switch 'any' and 'anext' in functions.rst (#107663)
Order was reversed in index at top, not in body.
2023-08-05 14:38:20 +00:00
Barney Gale ec0a0d2bd9
GH-70303: Emit FutureWarning when pathlib glob pattern ends with `**` (GH-105413)
In a future Python release, patterns with this ending will match both files
and directories. Users may add a trailing slash to remove the warning.
2023-08-04 23:12:12 +00:00
Tomas R 09a8cc7984
gh-107600: Docs: Update ctypes.ArgumentError error message (#107601) 2023-08-04 16:34:04 +02:00
Alexandru Mărășteanu c8872f4285
Clarify `Self` interaction with subclasses (#107511) 2023-08-01 13:20:25 -07:00
Michael The a22ff8e11c
gh-105578: Document that `AnyStr` is deprecated in py313 (#107116)
It will not be removed until Python 3.18.
2023-07-31 15:43:53 +00:00
Michael The f877b32b87
gh-105578: Add more usage examples to `typing.AnyStr` docs (#107045)
``typing.AnyStr`` has different semantics to ``str | bytes``, which often leads to user confusion
2023-07-31 16:23:08 +01:00
Dong-hee Na a24e25d74b
gh-107427: Update the description of UNPACK_SEQUENCE (gh-107429) 2023-07-31 00:40:37 +09:00
Rakesh Sabale 89fd4f4a3f
gh-107422: Remove outdated `TypedDict` example from typing docs (#107436) 2023-07-29 17:04:46 +00:00
Serhiy Storchaka f2d07d3289
gh-101100: Sphinx warnings: pick the low hanging fruits (GH-107386) 2023-07-29 08:48:10 +03:00
Eric Snow cf63df88d3
gh-107307: Update the importlib Docs for PEP 684 (gh-107400) 2023-07-28 16:00:03 -06:00
Serhiy Storchaka 0aa58fa7a6
gh-107091: Fix some uses of :const: role (GH-107379)
It is for references, not for literals.
2023-07-28 13:26:28 +03:00
Daniele Procida ccd4253752
gh-106996: Rewrite turtle explanation (#107244)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-27 11:02:19 +03:00
Serhiy Storchaka 6d5b6e71c8
gh-107091: Fix some uses of :c:type: role (GH-107138) 2023-07-26 22:29:23 +03:00
Roman Yurchak 737d1da074
Document that `os.link()` is not available on Emscripten (GH-104822) 2023-07-26 11:38:59 -07:00
Pablo Galindo Salgado da8f87b7ea
gh-107015: Remove async_hacks from the tokenizer (#107018) 2023-07-26 16:34:15 +01:00
Gregory P. Smith 70dc009469
gh-106939: document ShareableList nul-strip quirk. (#107266)
* gh-106939: document ShareableList nul-strip quirk.
* Mention the `int` size constraint.
2023-07-25 14:09:25 -07:00
Daniele Procida 2425346fee
gh-106996: Add a how-to section to the turtle documentation (#107153)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-25 15:03:57 +03:00