Commit graph

10787 commits

Author SHA1 Message Date
Miss Islington (bot)
591bf41609
[3.9] [doc] bpo-45680: Disambiguate `__getitem__ and __class_getitem__` in the data model (GH-29389) (GH-29619)
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:41:09 +01:00
Ethan Furman
feccea6a7e
[3.9] [Enum] update member.member removal (GH-29611)
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-18 00:50:42 -08:00
Miss Islington (bot)
17f5c5cad3
[docs] Add missing word "any" in unittest -k cmdline option description (GH-29571) (GH-29604)
(cherry picked from commit abc0d754c3)

Co-authored-by: ch33zer <ch33zer@gmail.com>
2021-11-18 01:26:12 +01:00
Miss Islington (bot)
fd206b6807
[3.9] Save a reference for ensure_future and create_task (GH-29163) (GH-29573)
Co-authored-by: Joannah Nanjekye <jnanjekye@python.org>
(cherry picked from commit c750adbe69)


Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>

Automerge-Triggered-By: GH:asvetlov
2021-11-16 03:47:02 -08:00
Miss Islington (bot)
a40d066e8e
bpo-45677: Reword first section of sqlite3 docs (GH-29326) (GH-29567)
* 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:32:31 -08:00
Miss Islington (bot)
6073920fcd
bpo-45752: Fix no-support examples in 'copy' docs (GH-29548)
(cherry picked from commit b7360ae395)

Co-authored-by: M. Mostafa Farzan <m2_farzan@yahoo.com>
2021-11-14 01:58:01 -08:00
Miss Islington (bot)
b952f60213
[3.9] bpo-45772: socket.socket should be a class instead of a function (GH-23960) (GH-29543)
* [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:29:01 -08:00
Miss Islington (bot)
8b6a474071
bpo-45792: Fix contextvar.Token's intersphinx FQN (GH-29533) (GH-29536)
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:20:20 +02:00
Miss Islington (bot)
a8ae7a5613
bpo-45762: Improve docs for `@singledispatch/@singledispatchmethod` (GH-29426) (GH-29430)
(cherry picked from commit 71e8a3e76a)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-11-05 17:52:14 +01:00
Miss Islington (bot)
7e244fc804
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:13:24 -07:00
Miss Islington (bot)
e813dd4d7b
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:34:31 -07:00
Miss Islington (bot)
d3e7755015
[doc] Link to section File input (GH-28941) (GH-29376)
(cherry picked from commit 48824fa1e2)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2021-11-02 22:59:42 +01:00
Miss Islington (bot)
4ab6e524ab
bpo-45457: Minor fix to documentation for SSLContext.load_default_certs. (GH-28947) (GH-29374)
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:53:45 +01:00
Miss Islington (bot)
da04bef5f7
[3.9] Move field width to the right field (GH-29344) (GH-29350)
Co-authored-by: Olaf van der Spek <olafvdspek@gmail.com>
2021-10-31 20:25:21 +00:00
Miss Islington (bot)
b04b307e0e
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:27:49 -07:00
Miss Islington (bot)
3ec1124de2
bpo-45600: Enhanced / clarified the docs for os.environ and os.environb (GH-29204) (GH-29321)
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:52:59 +02:00
Miss Islington (bot)
e1560313d4
bpo-45335: Add note to sqlite3 docs about "timestamp" converter (GH-29200) (GH-29320)
(cherry picked from commit 3877fc02f7)

Co-authored-by: Ian Fisher <ian@iafisher.com>
2021-10-29 22:42:38 +02:00
Alex Waygood
8813a987b1
[3.9] bpo-45655: Add "relevant PEPs" section to typing documentation (GH-29297)
Backport of https://github.com/python/cpython/pull/29280 to the 3.9 branch.
2021-10-28 23:17:28 +02:00
Miss Islington (bot)
01d11b1d62
bpo-45604: add level argument to multiprocessing.log_to_stderr func (GH-29226) (GH-29284)
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 22:03:32 +02:00
Miss Islington (bot)
020aa06ec8
bpo-45608: Document missing sqlite3 DB-API attributes and methods (GH-29219) (GH-29282)
(cherry picked from commit 88d8a1a340)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-10-28 21:57:35 +02:00
Miss Islington (bot)
c53428fe89
bpo-44344: Document that pow can return a complex number for non-complex inputs. (GH-27853) (GH-29134)
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:36 +02:00
Miss Islington (bot)
b26eae54e9
bpo-41983: add availability info to socket docs (GH-27519) (GH-29137)
* 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:38 +02:00
Ethan Furman
e628700dbf
[3.9] bpo-44174: [Enum] add name-mangling reference (GH-29128) 2021-10-21 11:32:18 -07:00
Ethan Furman
9733c9651a
[3.9] bpo-42517: [ENUM] update docs for changes coming in 3.11 (GH-29113) 2021-10-20 16:11:47 -07:00
Miss Islington (bot)
427ab124b3
bpo-45464: [doc] Explain that subclassing multiple exceptions is fragile (GH-29094) (GH-29105)
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:28 +02:00
Łukasz Langa
a18e4e9c15
[3.9] bpo-45449: add note about PEP 585 in collections.abc's documentation (GH-29047) (GH-29068)
Signed-off-by: Filipe Laíns <lains@riseup.net>

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

Co-authored-by: Filipe Laíns <lains@riseup.net>
2021-10-19 20:50:09 +02:00
Miss Islington (bot)
76578884c5
bpo-45515: Add zoneinfo to the datetime documentation (GH-29038) (GH-29066)
We should have done this way back when 3.9 was released, but it fell off
the radar.

Co-authored-by: Paul Ganssle <git@m.ganssle.io>
(cherry picked from commit 8e40ca127f)
2021-10-19 20:35:56 +02:00
Miss Islington (bot)
cb34c1ee1b
Improve multiserver queue recipe (GH-29012) (GH-29014) 2021-10-18 00:24:51 -05:00
Miss Islington (bot)
0cd5bf9194
Slight correct grammar (GH-28860)
(cherry picked from commit 1b11582f0e)

Co-authored-by: nobodyatandnothing <91722596+nobodyatandnothing@users.noreply.github.com>
2021-10-12 10:01:26 -07:00
Miss Islington (bot)
38e3ada75a
bpo-45441: Update some moved URLs in documentation (GH-28861)
(cherry picked from commit b37dc9b3bc)

Co-authored-by: 180909 <wjh180909@gmail.com>
2021-10-12 07:20:50 -07:00
Miss Islington (bot)
23528905d4
bpo-42253: Update xml.dom.minidom.rst (GH-23126) (GH-28875)
Document that the "standalone" parameter was added in Python 3.9.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit c7e81fcf95)

Co-authored-by: Jens Diemer <github.com@jensdiemer.de>
2021-10-12 10:18:15 +03:00
Miss Islington (bot)
320084fe7d
bpo-45351, asyncio: Enhance echo server example, print all addresses (GH-28828)
(cherry picked from commit 659812b451)

Co-authored-by: Olaf van der Spek <olafvdspek@gmail.com>
2021-10-11 12:34:51 -07:00
Miss Islington (bot)
5f44bb28fd
Fix the "Finding all Adverbs" example (GH-21420) (#28840)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit dbd62e74da)

Co-authored-by: Rim Chatti <chattiriim@gmail.com>
2021-10-10 14:43:58 -07:00
Miss Islington (bot)
4f161e65a0
[doc] Mention __slots__ behavior in weakref.rst (GH-21061) (GH-28773)
It took me longer than I expected to figure out why a random class
I dealt with didn't support weak references. I believe this addition
will make the __slots__/weakref interaction more discoverable to people
having troubles with this. (Before this patch __slots__ was not
mentioned in weakref documentation even once).

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

Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
2021-10-06 20:52:48 +02:00
Christian Clauss
edef03aaa8
[3.9] [doc] Fix typos found using codespell (GH-28744) (GH-28759) 2021-10-06 15:57:39 +02:00
Miss Islington (bot)
d747f5e805
[doc] Update references to NumPy (GH-22458) (GH-28749)
Numeric(al) Python to NumPy. It seems the old name hasn't been used for some time.
(cherry picked from commit c8bb24166e)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2021-10-06 15:04:48 +02:00
Miss Islington (bot)
92450f23c6
sqlite3: Modernize documentation around unicode and bytes. (GH-28652) (GH-28695)
(cherry picked from commit 1dac95c814)

Co-authored-by: Julien Palard <julien@palard.fr>
2021-10-05 23:04:02 +02:00
Miss Islington (bot)
950b324973
[doc] Fix gethostbyname_ex description (GH-28700) (GH-28743)
It seems part of `gethostbyname_ex` doc was copied from `gethostbyaddr`. The latter has an `ip_address` parameter whereas the former doesn't.
(cherry picked from commit 4103280b83)

Co-authored-by: Andre Delfino <adelfino@gmail.com>

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2021-10-05 19:22:14 +02:00
Łukasz Langa
68223cd12f
[3.9] [docs] Improve the markup of powers (GH-28598) (GH-28608)
(cherry picked from commit 4f05f15d7b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-28 23:13:16 +02:00
Miss Islington (bot)
fe7746c61a
[doc] fix minor typo for argparse (GH-28451)
"A JSONDecodeError" instead of "An JSONDecodeError".
(cherry picked from commit db0133f98d)

Co-authored-by: Louis Sautier <sautier.louis@gmail.com>
2021-09-28 07:07:20 -07:00
Miss Islington (bot)
2a7d985bb3
bpo-45277: Fix typo in codecs doc (GH-28555)
encoding => encode
(cherry picked from commit 4c0fc65cd8)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-09-24 19:22:54 -07:00
Miss Islington (bot)
b97f1f82a3
[docs] Update documentation for multiprocessing.get_start_method (GH-18170) (GH-28534)
(cherry picked from commit af90b5498b)

Co-authored-by: Sam Sneddon <me@gsnedders.com>
2021-09-23 23:39:08 +02:00
Miss Islington (bot)
7fa76ece30
[3.9] Fix legacy logging module URL (GH-28528) (GH-28531)
Co-authored-by: Sean Leavey <SeanDS@users.noreply.github.com>
2021-09-23 16:42:31 +01:00
Miss Islington (bot)
f1d5cdef57
bpo-41203: Replace Mac OS X and OS X with macOS (GH-28515) (GH-28524)
Replace old names when they refer to actual versions of macOS.
Keep historical names in references to older versions.

Co-authored-by: Patrick Reader <_@pxeger.com>
(cherry picked from commit 36122e1814)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-23 13:25:57 +03:00
Łukasz Langa
5482db5800
[3.9] [codemod] Fix non-matching bracket pairs (GH-28473) (GH-28512)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>.
(cherry picked from commit 8f943ca257)

Co-authored-by: Mohamad Mansour <66031317+mohamadmansourX@users.noreply.github.com>
2021-09-22 17:32:04 +02:00
Miss Islington (bot)
aea92de990
bpo-45246: Document that sorted() only uses "<" comparisons (GH-28494)
(cherry picked from commit 9a0dcc5b2e)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2021-09-21 10:53:26 -07:00
Miss Islington (bot)
41e2a31c13
bpo-30637: Improve the docs of ast.parse regarding differences with compile() (GH-28459)
(cherry picked from commit e6d05a4092)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-09-19 16:13:56 -07:00
Miss Islington (bot)
eb9833d265
[doc] Clarify exception in multiprocessing.cpu_count (GH-23660) (GH-28434)
Previous wording didn't explain the slightly unintuitive behavior.

Co-authored-by: kj <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 24dbe30f8d)

Co-authored-by: Emmanuel Arias <eamanu@yaerobi.com>
2021-09-18 01:23:38 +02:00
Miss Islington (bot)
6302701179
bpo-42038: fix description of returned list of lines (GH-27529) (GH-28429)
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-09-18 00:56:26 +02:00
Miss Islington (bot)
129e47733b
[doc] Add a missing apostrophe in a code example in venv.rst (GH-28391) (GH-28426)
(cherry picked from commit d22a700091)

Co-authored-by: Arkaprabha Chakraborty <chakrabortyarkaprabha998@gmail.com>
2021-09-18 00:18:19 +02:00