Commit graph

11578 commits

Author SHA1 Message Date
Miss Islington (bot)
d2be44230e
Remove out of date reference to YIELD_FROM from docs. (GH-94966) (GH-94975)
(cherry picked from commit c41d4d0917)

Co-authored-by: Mark Shannon <mark@hotpy.org>

Co-authored-by: Mark Shannon <mark@hotpy.org>
2022-07-19 12:58:44 +01:00
Miss Islington (bot)
a5c8cecf29
Fix incorrect double indent in ast doc (GH-94976)
Warning directive indent was 4 rather than 3 spaces.
(cherry picked from commit a25a803c4c)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-07-18 10:34:09 -07:00
Miss Islington (bot)
37ec0bdf16
In ast doc, update 'below' to 'above' (GH-94967)
The included asdl file was moved from 'below' to 'above' in 3.9.
(cherry picked from commit 7b617be4ab)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-07-18 09:46:26 -07:00
Miss Islington (bot)
1c63734217
gh-91348: Restore frame argument to sys._getframe audit event (GH-94928)
(cherry picked from commit 044a593cbb)

Co-authored-by: Steve Dower <steve.dower@python.org>
2022-07-17 08:49:57 -07:00
Miss Islington (bot)
ccbf85382c
gh-91181: drop support for bytes on sys.path (GH-31934)
Support for bytes broke sometime between Python 3.2 and 3.6 and has been broken ever since. Trying to bring back supports is surprisingly difficult in the face of -b and checking for keys in sys.path_importer_cache. Since the support was broken for so long, trying to overcome the difficulty of bringing back the support has been deemed not worth it.

Co-authored-by: Eryk Sun <eryksun@gmail.com>
Co-authored-by: Brett Cannon <brett@python.org>
(cherry picked from commit 6da988a46c)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2022-07-16 18:31:25 -07:00
Miss Islington (bot)
734c8b7e55
Add additional pointers to pathlib's mapping to os.path functions (GH-94828)
* Add additional pointers to pathlib's mapping to os.path functions

os.path.splitext has a somewhat quirky signature since it mixes the path and filename components but I wanted the documentation to mention `PurePath.stem` as the natural counterpart to `PurePath.suffix` for the common use of `os.path.splitext` to turn "file.py" into "file" and "py".

Technically this could have some discussion of how to handle the parent directory hierarchy but that seems a bit out of keeping with the spirit of this table so I omitted mentioning `PurePath.parents` here.

* Update Doc/library/pathlib.rst

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit 3789c63577)

Co-authored-by: Chris Adams <chris@improbable.org>
2022-07-15 15:21:34 -07:00
Miss Islington (bot)
a6c4ca9b7c
[3.11] [doc] Update cookbook example and add information about queue types. (GH-94854) (GH-94871)
(cherry picked from commit dc54193095)
2022-07-15 08:19:02 +01:00
Miss Islington (bot)
3b6cb56dc9
GH-46771: docs for asyncio.timeout and task cancellation (GH-94794)
(cherry picked from commit 08f68975ab)

Co-authored-by: Tin Tvrtković <tinchester@gmail.com>
2022-07-14 19:48:03 -07:00
Miss Islington (bot)
016fd7b57f
Docs: fix typo in sqlite3.rst (GH-94798)
Colum -> Column
(cherry picked from commit 9ea72e9d8d)

Co-authored-by: Ikko Ashimine <eltociear@gmail.com>
2022-07-14 14:56:30 -07:00
Miss Islington (bot)
7c185017a9
docs: typing.Self, fix typo (GH-94771)
* fix typo - double spelled word 'use'

* change methods names to the infinitive form
(cherry picked from commit 90a6e56e56)

Co-authored-by: Max Zhenzhera <59729293+maxzhenzhera@users.noreply.github.com>
2022-07-12 11:17:06 -07:00
John Belmonte
45896f2a02
[3.11] gh-93883: elide traceback indicators when possible (GH-93994) (GH-94740)
Elide traceback column indicators when the entire line of the
frame is implicated.  This reduces traceback length and draws
more attention to the remaining (very relevant) indicators.

Example:
```
Traceback (most recent call last):
  File "query.py", line 99, in <module>
    bar()
  File "query.py", line 66, in bar
    foo()
  File "query.py", line 37, in foo
    magic_arithmetic('foo')
  File "query.py", line 18, in magic_arithmetic
    return add_counts(x) / 25
           ^^^^^^^^^^^^^
  File "query.py", line 24, in add_counts
    return 25 + query_user(user1) + query_user(user2)
                ^^^^^^^^^^^^^^^^^
  File "query.py", line 32, in query_user
    return 1 + query_count(db, response['a']['b']['c']['user'], retry=True)
                               ~~~~~~~~~~~~~~~~~~^^^^^
TypeError: 'NoneType' object is not subscriptable
```

Automerge-Triggered-By: GH:pablogsal
2022-07-11 04:27:29 -07:00
Miss Islington (bot)
f3212b1ec7
GH-77265: Document NaN handling in statistics functions that sort or count (GH-94676) (#94726) 2022-07-10 12:35:33 -05:00
Miss Islington (bot)
cb4359ccfc
Use mdash-es consistently in the library docs index (GH-92762)
(cherry picked from commit efb20a97c4)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2022-07-08 07:52:02 -07:00
Erlend Egeberg Aasland
73a1800b55
[3.11] gh-94622: Add more references to the sqlite3 types anchor (GH-94623) (#94678)
(cherry picked from commit e5b841a403)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-08 02:50:01 +02:00
Miss Islington (bot)
c72001e5bd
gh-94321: Document sqlite3.PrepareProtocol (GH-94620)
(cherry picked from commit fb6dccae34)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-07 16:09:05 -07:00
Erlend Egeberg Aasland
3517c138a8
[3.11] gh-94628: Add explicit parameter list to sqlite3.connect docs (GH-94629) (#94645)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit 3eb2b9634f)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-07 10:46:14 +02:00
Miss Islington (bot)
fa44a760d5
gh-94630: Update sqlite3 docs with positional-only and keyword-only symbols (GH-94631)
(cherry picked from commit 94988603f3)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-06 16:22:10 -07:00
Miss Islington (bot)
37a47b139c
gh-94017: Improve clarity of sqlite3 transaction handling docs (GH-94320)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit 760b8cf0c8)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-07-06 14:08:13 -07:00
Miss Islington (bot)
552fc9a9ac
gh-91330: Tests and docs for dataclass descriptor-typed fields (GH-94424) (GH-94576)
Co-authored-by: Erik De Bonte <erikd@microsoft.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 5f319308a8)
2022-07-05 20:44:31 +02:00
Miss Islington (bot)
d49159bd9f
[3.11] bpo-46755: Don't log stack info twice in QueueHandler (GH-31355) (GH-94564)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-07-05 15:49:05 +01:00
Miss Islington (bot)
77bf973930
Docs: remove redundant "adverb-adjective" hyphens from compound modifiers (GH-94551) (GH-94557)
Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021
(cherry picked from commit 3440d197a5)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2022-07-05 14:30:19 +02:00
Vinay Sajip
8fe0b1d8fa
[3.11] Update logging documentation: change cross-reference and add webapp r… (GH-94541) 2022-07-04 09:09:40 +01:00
Miss Islington (bot)
1e7efbc449
IDLE doc: Tweek RESTART and Windows console start (GH-94530)
(cherry picked from commit 39c29f753e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-07-03 10:20:48 -07:00
Miss Islington (bot)
abf5f5c5d7
gh-81054: Document that SimpleHTTPRequestHandler follows symbolic links (GH-94416) (GH-94492)
(cherry picked from commit 80aaeabb8b)

Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
2022-07-01 18:41:24 +02:00
Miss Islington (bot)
1b46df1e3d
Update code sample when importing modules in queue doc (GH-94244) (GH-94490)
In the queue documentation, the code snippet shows the import to be not PEP 8 compliant.

Since people typically copy-paste from such code samples, I think it's important to show best-practices here.
(cherry picked from commit ad55147c1d)

Co-authored-by: Mariatta Wijaya <Mariatta@users.noreply.github.com>
2022-07-01 18:14:39 +02:00
Miss Islington (bot)
6c40538191
multiprocessing.spawn doc: Capitalize the p in "Python" (gh-94462)
(cherry picked from commit 62bb7a3b50)

Co-authored-by: Mariatta Wijaya <Mariatta@users.noreply.github.com>
2022-06-30 11:23:14 -07:00
Miss Islington (bot)
7fe949e5ea
GH-94398: TaskGroup: Fail create_task() during shutdown (GH-94400) (GH-94463)
Once the task group is shutting down, it should not be possible to create a new task.
Here "shutting down" means `self._aborting` is set, indicating that at least one task
has failed and we have cancelled all others.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 594c369949)

Co-authored-by: Guido van Rossum <guido@python.org>
2022-06-30 20:02:42 +02:00
Miss Islington (bot)
aed28b7feb
xml.dom.minidom docs: fix typo (GH-93437)
(cherry picked from commit 639e35108b)

Co-authored-by: Jean-Christophe Helary <jean.christophe.helary@traduction-libre.org>
2022-06-30 10:15:00 -07:00
Miss Islington (bot)
b3d69ffeb3
GH-90908: Document asyncio.TaskGroup (GH-94359) (GH-94456)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit b6ec6d4041)

Co-authored-by: Guido van Rossum <guido@python.org>
2022-06-30 18:27:15 +02:00
Irit Katriel
ecc8e77cc1
[3.11] gh-89038: [doc] update dis.findlinestarts documentation for changes related to PEP-626 (GH-94247) (GH-94450)
(cherry picked from commit d68f2d27bb)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-06-30 16:18:30 +01:00
Miss Islington (bot)
5084a64d38
bpo-92336: [doc] clarify that the dfile is read by the traceback display code (GH-94409)
(cherry picked from commit 68fb03249f)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-06-29 13:53:42 -07:00
Miss Islington (bot)
926bf235da
[3.11] gh-86404: [doc] Fix missing space in idle documentation. (GH-94366) (GH-94369)
This should have been spotted by sphinx-lint, tracked here:

https://github.com/sphinx-contrib/sphinx-lint/issues/39
(cherry picked from commit bc7f6fcdf1)


Co-authored-by: Julien Palard <julien@palard.fr>

Automerge-Triggered-By: GH:JulienPalard
2022-06-28 03:11:36 -07:00
Miss Islington (bot)
64365d0df9
gh-91860: Add docs for typing.dataclass_transform field specifier params (GH-94354) (GH-94372)
(cherry picked from commit 81ac9ac492)

Co-authored-by: Erik De Bonte <erikd@microsoft.com>
2022-06-28 12:10:42 +02:00
Miss Islington (bot)
1d2c8ff38f
gh-82006: IDLE doc improvements (GH-94349)
0. Update text start and stop conditions.
1. Title-case sections but not subsections.
2. Edit Shell Window sections: title, execute, restart.
(cherry picked from commit e6391e08bf)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-06-27 16:24:08 -07:00
Miss Islington (bot)
4ec1f8d643
gh-70474: [doc] fix wording of GET_ANEXT doc (GH-94048)
(cherry picked from commit 9af6b75298)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-06-25 15:51:19 -07:00
Erlend Egeberg Aasland
0a1517dc41
[3.11] gh-90016: Reword sqlite3 adapter/converter docs (GH-93095) (#94272)
Also add adapters and converter recipes.

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com.
(cherry picked from commit bd3c1c187e)
2022-06-25 22:55:17 +02:00
Miss Islington (bot)
251193e7fb
Docs: Remove Provides [...] from multiprocessing.shared_memory description (GH-92761)
(cherry picked from commit a91ffcf3fa)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2022-06-24 10:15:25 -07:00
Miss Islington (bot)
321acd4138
gh-91456: [Enum] Deprecate default auto() behavior with mixed value types (GH-91457)
When used with plain Enum, auto() returns the last numeric value assigned, skipping any incompatible member values (such as strings); starting in 3.13 the default auto() for plain Enums will require all the values to be of compatible types, and will return a new value that is 1 higher than any existing value.

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
(cherry picked from commit fb1e9506c1)

Co-authored-by: Oscar R <89599049+oscar-LT@users.noreply.github.com>
2022-06-22 23:46:33 -07:00
Miss Islington (bot)
c1bfff4f6b
gh-74696: Do not change the current working directory in shutil.make_archive() if possible (GH-93160) (GH-94105)
It is no longer changed when create a zip or tar archive.

It is still changed for custom archivers registered with shutil.register_archive_format()
if root_dir is not None.

Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit fda4b2f063)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-06-22 11:18:15 +02:00
Miss Islington (bot)
331e24455a
bpo-30535: [doc] state that sys.meta_path is not empty by default (GH-94098) (GH-94099)
Co-authored-by: Windson yang <wiwindson@outlook.com>
(cherry picked from commit 6575841266)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-06-21 23:04:51 +01:00
Miss Islington (bot)
41964de01b
gh-92611: Add details on replacements for cgi utility funcs (GH-92792) (GH-93967)
Per [suggestions on a Discourse thread](https://discuss.python.org/t/pep-594-take-2-removing-dead-batteries-from-the-standard-library/13508/51), discussed in GH-92611 and as a followup to PR GH-92612 , this PR add additional specific per-function replacement information for the utility functions in the `cgi` module deprecated by PEP 594 (PEP-594).

(cherry picked from commit 71354adff0)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-06-21 14:51:27 -07:00
Łukasz Langa
49687b0054
[3.11] gh-93675: Fix typos in Doc/ (GH-93676) (GH-94079)
Closes GH-93675
(cherry picked from commit 830513754d)

Co-authored-by: luzpaz <luzpaz@users.noreply.github.com>
2022-06-21 21:22:27 +02:00
Miss Islington (bot)
63e127f33d
gh-93851: Fix all broken links in Doc/ (GH-93853) (GH-94076)
(cherry picked from commit f62ff97f31)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2022-06-21 21:06:05 +02:00
Miss Islington (bot)
cc42716275
gh-86986: Drop compatibility support for Sphinx 2 (GH-93737)
* Revert "bpo-42843: Keep Sphinx 1.8 and Sphinx 2 compatibility (GH-24282)"

This reverts commit 5c1f15b4b1

* Revert "bpo-42579: Make workaround for various versions of Sphinx more robust (GH-23662)"

This reverts commit b63a620014.
(cherry picked from commit 0efe3a1636)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-06-21 10:50:47 -07:00
Miss Islington (bot)
b99f398bfb
gh-61162: Clarify sqlite3 connection context manager docs (GH-93890)
Explicitly note that transactions are only closed if there is an open
transation at `__exit__`, and that transactions are not implicitly
opened during `__enter__`.

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>

Automerge-Triggered-By: GH:erlend-aasland
(cherry picked from commit 8e08978141)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-06-19 13:27:46 -07:00
Miss Islington (bot)
8b068c4b0c
gh-93925: Improve clarity of sqlite3 commit/rollback, and close docs (GH-93926)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit 6446592c89)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-06-19 12:44:48 -07:00
Kumar Aditya
5ee86d4306
gh-91877: Fix WriteTransport.get_write_buffer_{limits,size} docs (#92338) (#93806)
- Amend docs for WriteTransport.get_write_buffer_limits
- Add docs for WriteTransport.get_write_buffer_size

Co-authored-by: Sanket Shanbhag <TechieBoy@users.noreply.github.com>
2022-06-17 10:18:00 +02:00
Miss Islington (bot)
40c257d64f
gh-93857: Fix broken audit-event targets in sqlite3 docs (GH-93859)
Corrected targets for the following audit-events:

- sqlite3.enable_load_extension => sqlite3.Connection.enable_load_extension
- sqlite3.load_extension => sqlite3.Connection.load_extension
(cherry picked from commit ce4d11f98b)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-06-15 07:09:37 -07:00
Miss Islington (bot)
528569319f
gh-87260: Update sqlite3 signature docs to reflect actual implementation (GH-93840)
Align the docs for the following methods with the actual implementation:

- sqlite3.complete_statement()
- sqlite3.Connection.create_function()
- sqlite3.Connection.create_aggregate()
- sqlite3.Connection.set_progress_handler()
(cherry picked from commit d31834688b)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-06-15 03:35:48 -07:00
Erlend Egeberg Aasland
9775ac3f07
[3.11] gh-89018: Improve documentation of sqlite3 exceptions (GH-27645) (#93836)
- Order exceptions as in PEP 249
- Reword descriptions, so they match the current behaviour

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit bb0b768946)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-06-15 11:36:55 +02:00