Commit Graph

10725 Commits

Author SHA1 Message Date
Miss Islington (bot) e47e6ffed3
bpo-41233: Add links to errnos referenced in exceptions docs (GH-21380)
Co-authored-by: Andrew Kuchling <amk@amk.ca>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit a74892cb21)

Co-authored-by: yyyyyyyan <24644216+yyyyyyyan@users.noreply.github.com>
2022-04-04 19:30:25 -07:00
Jelle Zijlstra 62da258a45
[3.9] Document func parameter of locale.atof (GH-18183) (GH-32261)
The second parameter (named `func`) has been present since the `locale`
module was introduced in eef1d4e8b1, but has never been documented.

This commit updates the documentation for `locale.atof` to clarify the
behavior of the function and how the `func` parameter is used.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>.
(cherry picked from commit 208da6d508)

Co-authored-by: Kevin Locke <kevin@kevinlocke.name>
2022-04-02 15:59:57 -07:00
Miss Islington (bot) 694425817b
bpo-45584: Clarify `math.trunc` documentation (GH-29183)
While floor/ceil 's documentation are very precise, `truncate` was not explained. I actually had to search online to understand the difference between `truncate` and `floor` (admittedly, once I remembered that numbers are signed, and that floating numbers actually uses a bit for negation symbol instead of two complement, it became obvious)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Éric Araujo <merwok@netwok.org>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit ebbdbbff5d)

Co-authored-by: Arthur Milchior <arthur@milchior.fr>
2022-04-02 15:36:33 -07:00
Miss Islington (bot) bf0f04f871
codecs docs: fix grammar mistake (GH-29462)
(cherry picked from commit ea56845744)

Co-authored-by: 180909 <wjh180909@gmail.com>
2022-04-02 14:34:18 -07:00
Miss Islington (bot) dc9322a91d
bpo-45114: Use lstat() instead of stat() in stat docs example (GH-29845)
(cherry picked from commit c93a0ac697)

Co-authored-by: 180909 <wjh180909@gmail.com>
2022-04-02 14:21:45 -07:00
Miss Islington (bot) 5b80031fb0
bpo-47031: Improve documentation for `math.nan` (GH-32170)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 182e93c3f5)

Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
2022-04-02 13:23:26 -07:00
Miss Islington (bot) c26af2bc53
bpo-42340: Document issues around KeyboardInterrupt (GH-23255)
Update documentation to note that in some circumstances,
KeyboardInterrupt may cause code to enter an inconsistent state. Also
document sample workaround to avoid KeyboardInterrupt, if needed.
(cherry picked from commit d0906c90fc)

Co-authored-by: benfogle <benfogle@gmail.com>
2022-03-29 14:48:10 -07:00
Miss Islington (bot) 5f0305b383
ctypes docs: Fix array-length reference to "non-negative" from "positive" (GH-32097) (GH-32143)
(cherry picked from commit 76f14b0463)

Co-authored-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-03-28 19:47:37 -07:00
Miss Islington (bot) 1e3132b1c3
bpo-28516: document contextlib.ExitStack.__enter__ behavior (GH-31636) (GH-32145)
The enter_context is updated with following information: 'The :meth:`__enter__` method
      returns the ExitStack instance, and performs no additional operations.'

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 86384cf83f)

Co-authored-by: vidhya <96202776+Vidhyavinu@users.noreply.github.com>
Co-authored-by: Ned Deily <nad@python.org>
2022-03-28 11:45:45 -07:00
Miss Islington (bot) b8b473e943
bpo-47105: Cite grp.h instead of pwd.h in grp docs (GH-32091) (GH-32121)
(cherry picked from commit ee912ad6f6)

Co-authored-by: Alex Hedges <aphedges@users.noreply.github.com>
2022-03-25 20:23:04 -04:00
Hugo van Kemenade e513b8188a
[3.9] bpo-47061: document module deprecations due to PEP 594 (GH-31984) (GH-32082)
Also removed asynchat, asyncore, and smtpd from their respective toctree entries so they are only  in the superceded subtree.
(cherry picked from commit 9ac2de922a)

Co-authored-by: Brett Cannon <brett@python.org>

Automerge-Triggered-By: GH:brettcannon
2022-03-23 13:13:08 -07:00
Jelle Zijlstra 0bbb6956f8
[3.9] bpo-46769: Improve documentation for `typing.TypeVar` (GH-31712) (GH-31941) (GH-32067)
* [3.9] [3.10] bpo-46769: Improve documentation for `typing.TypeVar` (GH-31712) (GH-31941)

* [3.10] bpo-46769: Improve documentation for `typing.TypeVar` (GH-31712)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 81b425d4dc)

* Remove references to `reveal_type`, add new section on `self` types.
(cherry picked from commit d5ed8a8258)

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

* remove unused susp allowlist

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-03-23 19:19:23 +01:00
Miss Islington (bot) f5af1677c0
[doc] configparser: avoid inline comments. (GH-31247)
People are testing those blocs with the default
inline_comment_prefixes of None, leading to a:

configparser.InterpolationSyntaxError: '$' must be followed by '$' or '{', found: '$ sign ($ is the only character that needs to be escaped)'
(cherry picked from commit 3ac4e783e0)

Co-authored-by: Julien Palard <julien@palard.fr>
2022-03-23 02:01:24 -07:00
Miss Islington (bot) 1e4044c74e
Fix typo in Path.iterdir docs (GH-31822)
(cherry picked from commit 795b365e8a)

Co-authored-by: Matt Williams <matt@milliams.com>
2022-03-22 20:16:18 -07:00
Hugo van Kemenade af341ebf00
[3.9] bpo-47022: Document asynchat, asyncore and smtpd removals in 3.12 (GH-31891) (#31998)
Document the deprecation of asyncore, asynchat, and smtpd with a slated removal in Python 3.12 thanks to PEP 594..
(cherry picked from commit 7747384643)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-03-22 11:12:39 -07:00
Miss Islington (bot) 73f4b475d1
[3.10] bpo-47040: improve document of checksum functions (GH-31955) (GH-32002)
Clarifies a versionchanged note on crc32 & adler32 docs that the workaround is only needed for Python 2 and earlier.
Also cleans up an unnecessary intermediate variable in the implementation.

Authored-By: Ma Lin / animalize
Co-authored-by: Gregory P. Smith <greg@krypto.org>
(cherry picked from commit 6d290d5862)

Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
2022-03-20 00:21:34 -07:00
Miss Islington (bot) fcd5799689
bpo-44544: add textwrap placeholder arg (GH-27671)
(cherry picked from commit cb7874f49d)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2022-03-19 05:54:07 -07:00
Miss Islington (bot) b4fd91b4d9
[3.9] bpo-30677: [doc] mention that os.mkdir() can raise FileNotFoundError (GH-31548) (GH-31878)
(cherry picked from commit 879fbd9472)


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

Automerge-Triggered-By: GH:iritkatriel
2022-03-14 13:52:07 -07:00
Illia Volochii 649cc9d688
[3.9] bpo-43215: Document Happy Eyeballs args of asyncio.open_connection (GH-24525) (GH-31868)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>.
(cherry picked from commit 3543ddb4c4)

Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
2022-03-14 15:15:49 +02:00
Jason R. Coombs 177be52517
[3.9] bpo-47004: Sync with importlib_metadata 4.11.3. (GH-31854). (GH-31859)
(cherry picked from commit b1e2868607)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2022-03-13 17:30:07 -04:00
Charlie Zhao b5140a5811
[3.9] bpo-46677: Add examples of inheritance and attributes to `TypedDict` docs. (GH-31349) (GH-31808)
* bpo-46677: Add examples of inheritance and attributes to `TypedDict` docs (GH-31349)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 8a207e0321)
2022-03-11 17:14:23 -08:00
Jelle Zijlstra 49ff5eddfe
[3.9] sqlite3: normalise pre-acronym determiners (GH-31772) (GH-31807)
For consistency, replace "a SQL" with "an SQL"..
(cherry picked from commit 2d5835a019)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-03-11 17:10:39 -08:00
Miss Islington (bot) 30d80213ae
bpo-31327: Update time documentation to reflect possible errors (GH-31460)
As per the comments, this mirrors the [datetime documentation](https://docs.python.org/3/library/datetime.htmlGH-datetime.datetime.fromtimestamp).

```
>>> import time
>>> time.localtime(999999999999999999999)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: timestamp out of range for platform time_t
>>> time.localtime(-3600)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 22] Invalid argument
```
(cherry picked from commit c83fc9c02c)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-03-11 11:28:19 -08:00
Jelle Zijlstra 0c47008f8b
[3.9] Docstring: replace pysqlite with sqlite3 (GH-31758) (GH-31778)
Replace two instances of "pysqlite" with "sqlite3" in sqlite3
docstrings. Also reword "is a no-op" to "does nothing" for clarity..
(cherry picked from commit b33a1ae703)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-03-09 10:19:53 -08:00
Miss Islington (bot) 0c718e02f6
bpo-46494: Mention the typing_extensions pkg in typing docs (GH-31260)
(cherry picked from commit 8debeed307)

Co-authored-by: Meer Suri <46469858+meersuri@users.noreply.github.com>
2022-03-07 20:29:09 -08:00
Miss Islington (bot) 01df048831
bpo-25415: Remove confusing sentence from IOBase docstrings (PR-31631)
(cherry picked from commit cedd2473a9)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-03-04 10:34:14 -08:00
Miss Islington (bot) 09819863a3
bpo-6634: [doc] clarify that sys.exit() does not always exit the interpreter (GH-31639) (GH-31661)
(cherry picked from commit 10117f1d8c)

Co-authored-by: vidhya <96202776+Vidhyavinu@users.noreply.github.com>

Co-authored-by: vidhya <96202776+Vidhyavinu@users.noreply.github.com>
2022-03-03 15:16:23 +00:00
Miss Islington (bot) cf8aff6319
bpo-21910: Clarify docs for codecs writelines method (GH-31245)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit a8c87a239e)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-03-02 17:45:36 -08:00
Miss Islington (bot) de2c91a89a
bpo-26897: Clarify Popen stdin, stdout, stderr file object docs (GH-30231)
(cherry picked from commit dd69f73421)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-02-25 09:07:05 -08:00
Miss Islington (bot) b7f6e8e135
bpo-34429: Noted TemporaryFile behavior on non-Posix/non-Cygwin systems (GH-31547)
(cherry picked from commit 53ecf9e08d)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-02-25 03:34:15 -08:00
Miss Islington (bot) 2387aeacc7
[3.9] bpo-20923 : [doc] Explain ConfigParser 'valid section name' and .SECTCRE (GH-31413) (GH-31507)
(cherry picked from commit bba8008f99)


Co-authored-by: vidhya <96202776+Vidhyavinu@users.noreply.github.com>

Automerge-Triggered-By: GH:iritkatriel
2022-02-22 10:43:55 -08:00
Miss Islington (bot) cf1993210f
Counter doc mentions three methods, but lists four (GH-30706)
Was probably caused by the addition of the `total()` method
(cherry picked from commit 99331fcf17)

Co-authored-by: Charles Brunet <charles.brunet@optelgroup.com>
2022-02-18 18:49:48 -08:00
Miss Islington (bot) 9399dc45cb
[docs] Correct typos in SSLContext.sni_callback (GH-30623)
Co-authored-by: Jörn Heissler <nosuchaddress@joern-heissler.de>
(cherry picked from commit f80a97b492)

Co-authored-by: Jörn Heissler <joernheissler@users.noreply.github.com>
2022-02-18 18:13:33 -08:00
Miss Islington (bot) 0da140da71
Update html.parser.rst (GH-30678)
This PR for the documentation of the [html.parser](https://docs.python.org/3/library/html.parser.html) module will

- fix a terminology mistake (‘start of a tag’ -> ‘start tag of an element’);
- mention the parameter names of the `HTMLParser.handle_*` methods where missing.
(cherry picked from commit 2945f5a7c5)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2022-02-17 04:46:25 -08:00
Miss Islington (bot) 1933238983
Update the OMG link (GH-30383)
(cherry picked from commit 04215a4272)

Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
2022-02-14 14:15:08 -08:00
Miss Islington (bot) 5c303f3209
doc: use colon for all color's rangs (GH-28998)
(cherry picked from commit 6b9f27dd0b)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2022-02-14 12:13:33 -08:00
Miss Islington (bot) 1953f03174
bpo-38619: Update the documentation for UUID.hex (GH-29830)
Explicitly state that it is lowercase.

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
(cherry picked from commit 5d53cf30f9)

Co-authored-by: 180909 <wjh180909@gmail.com>
2022-02-14 11:25:15 -08:00
John Belmonte 0b1417d597
[3.9] Corrections to format precision description. (GH-31291) (GH-31321)
* `precision` field is a decimal integer
  * clarify that stated limitations are on presentation type
    rather than input value type.  Especially misleading is
    "precision is not allowed for integer values", since integer
    value input to a format like `.1f` is fine.
  * regarding max field size, replace "non-number" with "string",
    which is the only non-numeric presentation type

Automerge-Triggered-By: GH:ericvsmith.
(cherry picked from commit 1d6ce67c29)

Co-authored-by: John Belmonte <john@neggie.net>
2022-02-13 22:05:11 -05:00
Miss Islington (bot) a7c1cc4169
bpo-46483: [doc] pathlib classes no longer support parameterized generics (GH-31281)
Remove pathlib classes from the list in stdtypes.rst of classes
that can be parameterized at runtime.
(cherry picked from commit e0bc8ee945)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-02-11 13:03:45 -08:00
Miss Islington (bot) c23f4ab3f5
Fix the signature of multiprocessing.set_executable (GH-31276)
Automerge-Triggered-By: GH:merwok
(cherry picked from commit 4f9386661d)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2022-02-11 07:08:44 -08:00
Miss Islington (bot) 459e26f098
[3.9] bpo-46609: Update asyncio-task coroutine doc (GH-31132)
@coroutine in removed in 3.11, not 3.10.
(cherry picked from commit 5603db43ba)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-02-04 15:46:09 -05:00
Miss Islington (bot) ee3d050e85
Optimize images by IMGbot (GH-21348)
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
(cherry picked from commit ba650af7d6)

Co-authored-by: Manish Kumar  <manishprivet@protonmail.com>
2022-02-03 23:15:17 -08:00
Miss Islington (bot) 1440dd3438
bpo-23556: [doc] Fix inaccuracy in documentation for raise without args. Improve tests for context in nested except handlers. (GH-29236)
(cherry picked from commit 08c0ed2d9c)

Co-authored-by: Kinshuk Dua <kinshukdua@gmail.com>
2022-01-27 02:50:43 -08:00
Miss Islington (bot) bc7d96ee33
bpo-45296: Clarify close, quit, and exit in IDLE (GH-30936)
In the File menu, 'Close' and 'Exit' are now 'Close Window' (the current
one) and 'Exit' is now 'Exit IDLE' (by closing all windows).
In Shell, 'quit()' and 'exit()' mean 'close Shell'.
If there are no other windows, this also exits IDLE.
(cherry picked from commit fcde0bc10d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-01-26 19:41:13 -08:00
Miss Islington (bot) 49971b2d18
bpo-43698: do not use `...` as argument name in docs (GH-30502)
(cherry picked from commit b9d8980d89)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-26 04:42:39 -08:00
Miss Islington (bot) d0852c447a
Update documentation in datetime module strftime-and-strptime-behavior fix typo in '%W' format code description (GH-30232) (GH-30703)
A small change to the documentation of datetime module , in the format codes section of stftime and strptime. Changed the description of format code '%W' from 'as a decimal number' to 'a zero padded   decimal number' so it's in line with the example having leading zeros.  Similar to the format code '%U' above.

Automerge-Triggered-By: GH:pganssle
(cherry picked from commit d45cd2d207)

Co-authored-by: Evan <binary-signal@users.noreply.github.com>

Co-authored-by: Evan <binary-signal@users.noreply.github.com>
2022-01-23 01:59:41 +01:00
Miss Islington (bot) d807bf2ee9
Document optional 'task'/'asyncgen' fields in call_exception_handler (GH-21735) (GH-30727)
(cherry picked from commit a1652da2c8)

Co-authored-by: Shane Harvey <shnhrv@gmail.com>

Co-authored-by: Shane Harvey <shnhrv@gmail.com>
2022-01-23 01:59:23 +01:00
Miss Islington (bot) b4088801db
bpo-46468: document that "-m http.server" defaults to port 8000 (GH-30776) (#30786)
Code link:
70c16468de/Lib/http/server.pyGH-L1270

It's been this way since at least 3.4.

Also improved some wording in the same section.
(cherry picked from commit c8a536624e)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-01-22 17:31:40 +02:00
Miss Islington (bot) 981c1dc8b6
doc: Clarify os.urandom return type (GH-30282)
Other descriptions in the same file also use 'bytestring' to refer to bytes objects
(cherry picked from commit 4b99803b86)

Co-authored-by: Florian Bruhin <me@the-compiler.org>
2022-01-19 14:07:47 -08:00
Ken Jin 00645166b6
[3.9] bpo-45680: Clarify documentation on ``GenericAlias`` objects (GH-29335) (GH-30689)
The documentation on ``GenericAlias`` objects implies at multiple points that
only container classes can define ``__class_getitem__``. This is misleading.
This PR proposes a rewrite of the documentation to clarify that non-container
classes can define ``__class_getitem__``, and to clarify what it means when a
non-container class is parameterized.

See also: initial discussion of issues with this piece of documentation in
GH-29308, and previous BPO issue [42280](https://bugs.python.org/issue42280).

Also improved references in glossary and typing docs. Fixed some links.

(cherry picked from commit 0eae9a2a2d)

Co-Authored-By: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Co-Authored-By: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-Authored-By: Alex Waygood <Alex.Waygood@Gmail.com>
2022-01-20 00:01:30 +08:00