Commit graph

10976 commits

Author SHA1 Message Date
Andrew Svetlov
991736697d
[3.10] bpo-46040: Fix removal text for @asyncio.coroutine (GH-30061) 2021-12-11 20:27:47 +02:00
Miss Islington (bot)
1f7000808e
bpo-19737: Improved the documentation for globals (GH-29823) (GH-30041)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 4fe5585240)

Co-authored-by: 180909 <734461790@qq.com>
2021-12-11 01:32:13 +01:00
Miss Islington (bot)
8f3728edcb
bpo-42114: ctypes documentation: fix winmode parameter default value (GH-29976) (GH-30037)
Signed-off-by: Louis Sautier <sautier.louis@gmail.com>
(cherry picked from commit c1051e08b3)

Co-authored-by: Louis Sautier <sautier.louis@gmail.com>
2021-12-11 00:29:46 +01:00
Miss Islington (bot)
64c2788f42
bpo-42182: stdtypes doc - update and fix links to several dunder methods (GH-27384)
(cherry picked from commit 8c74713d0e)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-12-10 02:02:14 -08:00
Miss Islington (bot)
2c2ee83c4d
bpo-45391: mark UnionType as a class in documentation (GH-28757)
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
(cherry picked from commit e2cfc89e09)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
2021-12-09 05:17:36 -08:00
Mark Shannon
99c72326d2
[3.10] bpo-46009: Do not exhaust generator when send() method raises (GH-29986). (GH-29988)
* [3.10] bpo-46009: Do not exhaust generator when send() method raises (GH-29986).
(cherry picked from commit 69806b9516)

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

* Rename variable after cherry-pick.

* Add NULL check.
2021-12-08 14:46:32 +00:00
Miss Islington (bot)
14f03ce6e8
[3.10] bpo-35821: Fix restructuredtext code formatting in logging.rst (GH-29963) (GH-29965)
(cherry picked from commit c7e7a4b969)


Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>

Automerge-Triggered-By: GH:Fidget-Spinner
2021-12-07 07:47:31 -08:00
Miss Islington (bot)
f78c229b4e
[3.10] bpo-35821: Add an example to Logger.propagate documentation. (GH-29841) (GH-29957) 2021-12-07 11:45:13 +00:00
Miss Islington (bot)
15da2a2723
bpo-46001: Change OverflowError to RecursionError in JSON library docstrings (GH-29943)
(cherry picked from commit 8db06528ca)

Co-authored-by: James Gerity <snoopjedi@gmail.com>
2021-12-07 02:20:10 -08:00
Miss Islington (bot)
eac07e5ab0
docs: Improve example for urlparse() (GH-29816) (GH-29888)
(cherry picked from commit 226d22ff2d)

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-12-02 12:25:13 +02:00
Miss Islington (bot)
e99c5e039b
bpo-45896: Fix docs default asyncio event loop on Windows (GH-29857) (GH-29877)
(cherry picked from commit f27bef3043)

Co-authored-by: Rob <r4226@pm.me>
2021-12-01 17:44:09 +02:00
Miss Islington (bot)
39751420b3
bpo-33381: [doc] strftime's %f option may pad zeros on the left or the right (GH-29801) (GH-29862)
(cherry picked from commit f97ec09baf)

Co-authored-by: Vishal Pandey <vishalpandeyviptsk@gmail.com>
2021-11-30 11:49:59 +00:00
Miss Islington (bot)
32f1491a97
bpo-43905: Expand dataclasses.astuple() and asdict() docs (GH-26154)
Expanded ``astuple()`` docs, warning about deepcopy being applied
and providing a workaround.

Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit c1f93f0d37)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-11-29 10:32:56 -08:00
Andrew Svetlov
52d10f6485
[3.10] bpo-45568: Actually use @asynccontextmanager in usage example (GH-29151) (GH-29779)
Automerge-Triggered-By: GH:asvetlov
(cherry picked from commit 4dd82194f4)

Co-authored-by: Zbigniew Siciarz <zbigniew@siciarz.net>

Co-authored-by: Zbigniew Siciarz <zbigniew@siciarz.net>
2021-11-25 19:20:17 +02:00
Miss Islington (bot)
8cabcde8d6
bpo-45693: Document port parameter to loop.create_server (GH-29760) (GH-29762)
Document the `port` parameter to `loop.create_server` in `asyncio`. In
particular, note that if `host` resolves to multiple network interfaces,
passing in `port=0` will result in a different random unused port being
used for each interface.

Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit d71c7bc733)

Co-authored-by: Jim Crist-Harif <jcristharif@gmail.com>

Co-authored-by: Jim Crist-Harif <jcristharif@gmail.com>
2021-11-24 15:39:51 -05:00
Brett Cannon
99aad31b7a
[3.10] bpo-45250: fix docs regarding __iter__ and iterators being inconsistently required by CPython (GH-29170) (GH-29650)
It is now considered a historical accident that e.g. `for` loops and the `iter()` built-in function do not require the iterators they work with to define `__iter__`, only `__next__`.
(cherry picked from commit be36e06340)

Co-authored-by: Brett Cannon <brett@python.org>
2021-11-22 15:09:15 -08:00
Miss Islington (bot)
2a630e716e
[3.10] bpo-45788: Link sys.prefix doc to 'Installation paths' (GH-29606)
... To the Installation paths section of the sysconfig doc.
(cherry picked from commit 4575c01b75)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-11-18 16:46:06 -05:00
Miss Islington (bot)
fde9f61e70
[3.10] [doc] bpo-45680: Disambiguate `__getitem__ and __class_getitem__` in the data model (GH-29389) (GH-29620)
The documentation explaining Python's data model does not adequately explain
the differences between ``__getitem__`` and ``__class_getitem__``, nor does it
explain when each is called. There is an attempt at explaining
``__class_getitem__`` in the documentation for ``GenericAlias`` objects, but
this does not give sufficient clarity into how the method works. Moreover, it
is the wrong place for that information to be found; the explanation of
``__class_getitem__`` should be in the documentation explaining the data model.

This PR has been split off from GH-29335.
(cherry picked from commit 31b3a70edb)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-11-18 18:34:08 +01:00
Miss Islington (bot)
02531f1d7e
[doc] Expand on soft keywords in the docs for keyword.py (GH-29139) (GH-29195)
Add link at the top and fix the existing links to point to the "[soft keywords](https://docs.python.org/3.10/reference/lexical_analysis.htmlGH-soft-keywords)" section created in the Python 3.10 docs.

(cherry picked from commit 9e05da6224)

Co-authored-by: William Andrea <william.j.andrea@gmail.com>
2021-11-18 17:23:03 +01:00
Miss Islington (bot)
0df5d31ac7
bpo-45701: Improve documentation for *typed* parameter (GH-29498) (GH-29509)
(cherry picked from commit 912a4ccc3a)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2021-11-18 17:12:07 +01:00
Ethan Furman
65c089751b
[3.10] [Enum] update member.member removal (GH-29608)
Accessing one enum member from another originally raised an `AttributeError`, but became possible due to a performance boost implementation detail.  In 3.11 it will again raise an `AttributeError`.
2021-11-17 23:38:56 -08:00
Miss Islington (bot)
563e45875a
[docs] Add missing word "any" in unittest -k cmdline option description (GH-29571) (GH-29603)
(cherry picked from commit abc0d754c3)

Co-authored-by: ch33zer <ch33zer@gmail.com>
2021-11-18 01:25:54 +01:00
Miss Islington (bot)
7bac598819
Save a reference for ensure_future and create_task (GH-29163)
Co-authored-by: Joannah Nanjekye <jnanjekye@python.org>
(cherry picked from commit c750adbe69)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
2021-11-16 03:51:19 -08:00
Miss Islington (bot)
94dad5e41e
bpo-45677: Reword first section of sqlite3 docs (GH-29326) (GH-29566)
* bpo-45677: Avoid addressing the reader as 'you' in sqlite3 docs

* Adjust wording

* Adjust wording again

* Typo

* Update Doc/library/sqlite3.rst

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>

* Address review: adjust wording

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Lib/sqlite3/__init__.py

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Lib/sqlite3/__init__.py

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Apply Alex' suggestion, and apply 80 char limit to PR

* Minor adjustment

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit 6c5a312fb6)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-11-15 15:31:38 -08:00
M. Mostafa Farzan
2081f9fe75
[3.10] bpo-45752: Fix no-support examples in 'copy' docs (GH-29548) (GH-29556)
(cherry picked from commit b7360ae395)

Co-authored-by: M. Mostafa Farzan <m2_farzan@yahoo.com>

Automerge-Triggered-By: GH:asvetlov
2021-11-14 04:54:42 -08:00
Miss Islington (bot)
28326ac5f8
bpo-45799: [Doc] improve confusing sentence in __main__.rst (GH-29546)
I was reading this bit last night and thought it was a typo. In the light of day, I realized it wasn't *technically* a typo, but definitely confusing wording. This PR fixes the confusing sentence.

Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit f8da00ef04)

Co-authored-by: Jack DeVries <jdevries3133@gmail.com>
2021-11-13 12:36:44 -08:00
Miss Islington (bot)
3f15792d60
[3.10] bpo-45772: socket.socket should be a class instead of a function (GH-23960) (GH-29542)
* [bpo-45772](): socket.socket should be a class instead of a function

Currently `socket.socket` is documented as a function, but it is really
a class (and thus has function-like usage to construct an object). This
correction would ensure that Python projects that are interlinking
Python's documentation can properly locate `socket.socket` as a type.
(cherry picked from commit 4c792f39e6)


Co-authored-by: Hong Xu <hong@topbug.net>

Automerge-Triggered-By: GH:asvetlov
2021-11-12 22:23:23 -08:00
Miss Islington (bot)
628667ac9a
bpo-45792: Fix contextvar.Token's intersphinx FQN (GH-29533) (GH-29535)
Since `.. module:: contextvars` sets the module using `.. class:: contextvars.Token`, intersphinx records it as `contextvars.contextvars.Token`.
(cherry picked from commit e501d70b34)

Co-authored-by: Hynek Schlawack <hs@ox.cx>

Co-authored-by: Hynek Schlawack <hs@ox.cx>
2021-11-12 12:19:52 +02:00
Miss Islington (bot)
e53cb9811f
bpo-39452: [doc] Change "must" to "can" on relative import style in __main__ (GH-29379) (GH-29449)
(cherry picked from commit 57457a1e5c)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2021-11-06 19:50:00 +01:00
Miss Islington (bot)
279a7a0c94
bpo-45762: Improve docs for `@singledispatch/@singledispatchmethod` (GH-29426) (GH-29431)
(cherry picked from commit 71e8a3e76a)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-11-05 17:49:40 +01:00
Miss Islington (bot)
75ed2ce9e8
Remove reference to `Tuple at top of typing` docs (GH-29401)
``typing.Tuple`` has been deprecated since Python 3.9, so it makes no sense to mention it so prominently in the documentation for the ``typing`` module.
(cherry picked from commit 87032cfa3d)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-11-04 05:11:14 -07:00
Miss Islington (bot)
c10896696f
bpo-45680: `typing docs: improve links to docs on GenericAlias/__class_getitem__` (GH-29387)
(cherry picked from commit e03e50377d)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-11-03 21:27:47 -07:00
Miss Islington (bot)
8af3090cb7
[doc] Link to section File input (GH-28941) (GH-29375)
(cherry picked from commit 48824fa1e2)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2021-11-02 22:54:53 +01:00
Miss Islington (bot)
71f602b54c
bpo-45457: Minor fix to documentation for SSLContext.load_default_certs. (GH-28947) (GH-29373)
Specify that SSLContext.set_default_verify_paths is called on ALL systems.

The code of SSLContext.load_default_certs was changed in bpo-22449 to do this,
this fix corrects the documentation to match that change.
(cherry picked from commit 3551bf16ee)

Co-authored-by: LincolnPuzey <lincoln@puzey.dev>
2021-11-02 22:47:50 +01:00
Miss Islington (bot)
ed34965d66
[3.10] Move field width to the right field (GH-29344) (GH-29351)
Co-authored-by: Olaf van der Spek <olafvdspek@gmail.com>
2021-10-31 20:25:44 +00:00
Miss Islington (bot)
89b1237ffb
bpo-45516: add protocol description to the Traversable documentation (GH-29039)
* bpo-45516: add protocol description to the Traversable documentation

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Update Doc/library/importlib.rst

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

* Update Lib/importlib/abc.py

* Update Doc/library/importlib.rst

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
(cherry picked from commit 4d03de3329)

Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>
2021-10-31 12:26:49 -07:00
Miss Islington (bot)
da222b7cc8
Fix docs source link for importlib.metadata (GH-29025)
The link broke for Python 3.10 since importlib.metadata was made from a module into a package

I think this is trivial enough to not need a bpo issue.

Automerge-Triggered-By: GH:jaraco
(cherry picked from commit aae18a1740)

Co-authored-by: Philipp A <flying-sheep@web.de>
2021-10-30 08:32:14 -07:00
Miss Islington (bot)
0538351fca
bpo-45600: Enhanced / clarified the docs for os.environ and os.environb (GH-29204) (GH-29322)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit b17cfd150f)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-10-29 22:45:33 +02:00
Miss Islington (bot)
8ea665c730
bpo-45335: Add note to sqlite3 docs about "timestamp" converter (GH-29200) (GH-29319)
(cherry picked from commit 3877fc02f7)

Co-authored-by: Ian Fisher <ian@iafisher.com>
2021-10-29 22:41:45 +02:00
Miss Islington (bot)
6742b0dfb6
bpo-45655: Add ref to union type expressions at top of typing docs (GH-29309)
(cherry picked from commit d9575218d7)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-10-29 07:16:19 -07:00
Alex Waygood
2c8a0027e5
[3.10] bo-45655: Add "relevant PEPs" section to typing documentation (GH-29302)
The list of PEPs at the top of the documentation for the ``typing`` module has
become too long to be readable. This PR proposes presenting this
information in a more structured and readable way by adding a new "relevant
PEPs" section to the ``typing`` docs.

(cherry picked from commit 03db1bbfd2)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-10-29 18:03:48 +08:00
Miss Islington (bot)
fb80aede6a
bpo-45604: add level argument to multiprocessing.log_to_stderr func (GH-29226) (GH-29283)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 1fb968c07a)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-10-28 21:58:24 +02:00
Miss Islington (bot)
1d88b2b0a1
bpo-45608: Document missing sqlite3 DB-API attributes and methods (GH-29219) (GH-29281)
(cherry picked from commit 88d8a1a340)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-10-28 21:57:14 +02:00
Miss Islington (bot)
99495b8aff
Fix typo in Counter documentation (GH-29223)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 0a68b3603f)

Co-authored-by: Justinas Petuchovas <justinas.petuchovas@gmail.com>
2021-10-28 04:06:04 -07:00
Miss Islington (bot)
9b3cda5687
bpo-44344: Document that pow can return a complex number for non-complex inputs. (GH-27853) (GH-29135)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 887a55705b)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
2021-10-22 00:08:20 +02:00
Miss Islington (bot)
8fd7e8965d
bpo-41983: add availability info to socket docs (GH-27519) (GH-29136)
* add availability info to AF_PACKET section
* add availability for AF_QIPCRTR as well

(cherry picked from commit 51375388be)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-10-22 00:07:07 +02:00
Ethan Furman
828722aca4
[3.10] bpo-44174: [Enum] add reference to name mangling (GH-29117) 2021-10-21 09:50:29 -07:00
Ethan Furman
2a9ab75af3
bpo-44559: [Enum] restore fixes lost in 3.9 reversion (GH-29114)
- fix exception leaks
- re-add deprecation warnings
2021-10-20 19:48:37 -07:00
Miss Islington (bot)
b2a989995e
bpo-45464: [doc] Explain that subclassing multiple exceptions is fragile (GH-29094) (GH-29104)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
(cherry picked from commit dff0b71343)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-10-20 20:50:09 +02:00
Miss Islington (bot)
0d0312e1ac
Add PEPs 593 & 647 to list of PEPs at top of typing docs (GH-29097)
(cherry picked from commit d9e1dae35a)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-10-20 08:36:34 -07:00