Commit graph

12967 commits

Author SHA1 Message Date
Miss Islington (bot)
52df6c427c
[3.12] gh-85453: Fix 'timezone' vs. 'time zone' spelling issues in datetime.rst (GH-118449) (#121838)
(cherry picked from commit 1755df7b3b)

Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
2024-07-16 08:23:40 +00:00
Miss Islington (bot)
863c0a3c51
[3.12] gh-120012: clarify the behaviour of multiprocessing.Queue.empty on closed queues. (GH-120102) (#120470)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-07-14 04:25:09 -06:00
Miss Islington (bot)
b6cb209d5d
[3.12] gh-73159 Added clarifications in multiprocessing docs on that objects are pickled. (GH-121686) (#121728)
gh-73159 Added clarifications in multiprocessing docs on that objects are pickled. (GH-121686)

Added explicit comments about that objects are pickled when transmitted via multiprocessing queues and pipes.
(cherry picked from commit b5805892d5)

Co-authored-by: Ulrik Södergren <ulrik@digitalfotografen.se>
2024-07-13 20:13:52 +00:00
Miss Islington (bot)
920625309c
[3.12] gh-120823: Fix doc for ftplib.FTP.retrbinary() (GH-121697) (GH-121706)
(cherry picked from commit 422855ad21)

Co-authored-by: mirelagrigoras <47386964+mirelagrigoras@users.noreply.github.com>
Co-authored-by: Mirela Andreea GRIGORAS <magrigoras@bitdefender.com>
2024-07-13 16:35:03 +02:00
Miss Islington (bot)
e4c8d89186
[3.12] gh-96765: Update ConfigParser.read() docs with multi-file read example (GH-121664) (GH-121688)
(cherry picked from commit fc21781175)

Co-authored-by: Timon Viola <44016238+timonviola@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-07-13 15:07:30 +02:00
Hugo van Kemenade
377ff9d584
[3.12] NEWS: Fix Sphinx warnings and increase threshold for new news nits (GH-121482) (#121514)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-07-13 12:54:50 +00:00
Miss Islington (bot)
f24f31656c
[3.12] gh-121333: Clarify what is the default executor for asyncio.run_in_executor (GH-121335) (#121525)
gh-121333: Clarify what is the default executor for asyncio.run_in_executor (GH-121335)
(cherry picked from commit facf9862da)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2024-07-09 15:06:40 +05:30
Miss Islington (bot)
da7f6745b8
[3.12] gh-121461: Fix os.path.normpath documentation indentation (GH-121466) (#121473)
gh-121461: Fix os.path.normpath documentation indentation (GH-121466)
(cherry picked from commit bf74db731b)

Co-authored-by: CBerJun <121291537+CBerJun@users.noreply.github.com>
2024-07-08 03:58:26 +00:00
Miss Islington (bot)
e7cea781bd
[3.12] Update example of str.split, bytes.split (GH-121287) (#121416)
Update example of str.split, bytes.split (GH-121287)

In `{str,bytes}.strip(chars)`, multiple characters are not treated as a
prefix/suffix, but as individual characters. This may make users confuse
whether `split` has similar behavior.
Users may incorrectly expect that
`'Good morning, John.'.split(', .') == ['Good', 'morning', 'John']`

Adding a bit of clarification in the doc.

(cherry picked from commit 892e3a1b70)

Co-authored-by: Yuxin Wu <ppwwyyxxc@gmail.com>
Co-authored-by: Yuxin Wu <ppwwyyxx@users.noreply.github.com>
2024-07-05 13:23:00 -07:00
Miss Islington (bot)
de86aaa160
[3.12] gh-90437: Fix __main__.py documentation wording (GH-116309) (GH-121386)
gh-90437: Fix __main__.py documentation wording (GH-116309)
(cherry picked from commit cb688bab08)

Co-authored-by: Ali Tavallaie <tavallaie@users.noreply.github.com>
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Frank Dana <ferdnyc@gmail.com>
2024-07-04 22:55:54 +00:00
Miss Islington (bot)
e5a19b981d
[3.12] gh-121196: Document dict.fromkeys params as pos-only (GH-121197) (#121243)
gh-121196: Document `dict.fromkeys` params as pos-only (GH-121197)
(cherry picked from commit 1dc9a4f6b2)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-07-01 20:37:19 +00:00
Miss Islington (bot)
d4747727af
[3.12] GH-119054: Add alt text to pathlib inheritance diagram (GH-121158) (#121169)
GH-119054: Add alt text to pathlib inheritance diagram (GH-121158)
(cherry picked from commit 6b280a8498)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-06-29 17:53:27 +00:00
Barney Gale
d6eff187b5
[3.12] GH-119054: Fix pathlib docs subtitle word order (#121167)
When backporting GH-120505 to 3.12, I accidentally transposed
"Permissions and ownership" into "Ownership and permissions".
Swap it back for consistency with 3.13 and main.
2024-06-29 18:50:01 +01:00
Barney Gale
22dfecf1f5
[3.12] GH-119054: Add "Expanding and resolving paths" section to pathlib docs. (GH-120970) (#121156)
Add dedicated subsection for `home()`, `expanduser()`, `cwd()`,
`absolute()`, `resolve()` and `readlink()`. The position of this section
keeps all the `Path` constructors (`Path()`, `Path.from_uri()`,
`Path.home()` and `Path.cwd()`) near the top. Within the section, closely
related methods are kept adjacent. Specifically:

- `home()` and `expanduser()` (the former calls the latter)
- `cwd()` and `absolute()` (the former calls the latter)
- `absolute()` and `resolve()` (both make paths absolute)
- `resolve()` and `readlink()` (both read symlink targets)
- Ditto `cwd()` and `absolute()`
- Ditto `absolute()` and `resolve()`

The "Other methods" section is removed.

(cherry picked from commit d6d8707ff2)
2024-06-29 16:38:39 +01:00
Miss Islington (bot)
3a420de986
[3.12] gh-115986 Improve pprint docs formatting (GH-117401) (GH-121099)
gh-115986 Improve pprint docs formatting (GH-117401)

* Move pprinter parameters description to the table

The change improves readability.
Suggested in the GHGH-116085 PR discussion.

* Make pprint doc with params markup

* Fix formatting
Indentation of code blocks made them nested
"Version changed" is better placed after the code block

* Fix formatting for tests

* fix code indentation for autotests

* Fix identation for autotests

* Remove duplication of the parameters' description

* Rearrange parameters description in a correct order

---------

(cherry picked from commit 0890ad7c02)

Co-authored-by: Kerim Kabirov <the.privat33r+gh@pm.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-06-28 18:21:56 +02:00
Miss Islington (bot)
566898a3f6
[3.12] gh-120661: improve example for basic type hints (GH-120934) (#120988)
gh-120661: improve example for basic type hints (GH-120934)
(cherry picked from commit bb057ea107)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-06-25 09:25:11 +01:00
Barney Gale
52bc99743c
[3.12] GH-119054: Add "Permissions and ownership" section to pathlib docs. (GH-120505) (#120968)
Add dedicated subsection for `pathlib.owner()`, `group()`, `chmod()` and
`lchmod()`.

(cherry picked from commit e4a97a7fb1)
2024-06-24 20:32:24 +01:00
Miss Islington (bot)
3afb856dda
[3.12] gh-112169: Documented getaddrinfo/getnameinfo default loop executor usage and implications. (GH-112191) (#120936)
gh-112169: Documented getaddrinfo/getnameinfo default loop executor usage and implications. (GH-112191)
(cherry picked from commit fc297b4ba4)

Co-authored-by: Alek Kowalczyk <alek.kowalczyk@gmail.com>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-06-24 08:45:46 +00:00
Miss Islington (bot)
673cabc23b
[3.12] Typing docs: normalize some indents in code examples (GH-120912) (#120916)
Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com>
2024-06-23 17:23:01 +01:00
Bénédikt Tran
32d43e5fa2
[3.12] gh-119960: Add information about regex flags in re module functions (GH-119978) (#120908)
gh-119960: Add information about regex flags in re module functions (#119978)

(cherry picked from commit a86e6255c3)

Co-authored-by: Awbert <119314310+SweetyAngel@users.noreply.github.com>
2024-06-23 21:32:24 +05:30
Miss Islington (bot)
2d6d862706
[3.12] gh-120896: Fix typo in version changed note of urllib.parse.urlparse() (GH-120898) (#120903)
gh-120896: Fix typo in version changed note of `urllib.parse.urlparse()` (GH-120898)
(cherry picked from commit b6fa8fe86a)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
2024-06-23 18:10:11 +05:30
Miss Islington (bot)
2b2530540f
[3.12] gh-119003: Clarify slice assignments (GH-119935) (#120848)
gh-119003: Clarify slice assignments (GH-119935)
(cherry picked from commit 462832041e)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
2024-06-23 18:04:25 +05:30
Miss Islington (bot)
9bbb91c066
[3.12] gh-120773: document introspective attributes of an async generator object in the inspect module (GH-120778) (#120828)
gh-120773: document introspective attributes of an async generator object in the inspect module (GH-120778)
(cherry picked from commit 83d3d7aace)

Co-authored-by: blhsing <blhsing@gmail.com>
2024-06-21 16:58:58 +05:30
Miss Islington (bot)
e58bece8ce
[3.12] gh-111259: Document idiomatic RE pattern (?s:.) that matches any character (GH-120745) (GH-120814)
(cherry picked from commit a2f6f7dd26)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-20 21:10:35 +00:00
Jelle Zijlstra
0c6d6ab252
[3.12] gh-119698: fix symtable.Class.get_methods and document its behaviour correctly (#120151) (#120776)
(cherry picked from commit b8a8e04fec)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-06-19 22:12:31 -07:00
Miss Islington (bot)
70d71fb4ea
[3.12] gh-120662: Improve smtplib example (GH-120668) (#120682)
gh-120662: Improve `smtplib` example (GH-120668)
(cherry picked from commit 4bc27abdbe)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-06-18 12:04:06 +00:00
Miss Islington (bot)
40ce124886
[3.12] gh-112346: Document the OS byte in gzip.compress output change in 3.11 (GH-120480) (#120613)
gh-112346: Document the OS byte in `gzip.compress` output change in 3.11 (GH-120480)
(cherry picked from commit bac4edad69)


gh-112346: Describe the "os" byte in gzip output change.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-06-17 05:54:33 +00:00
Miss Islington (bot)
7abfc92c8b
[3.12] gh-118596: Add thread-safety clarifications to the SSLContext documentation (GH-118597) (#120596)
gh-118596: Add thread-safety clarifications to the SSLContext documentation (GH-118597)

Add thread-safety clarifications to the SSLContext documentation. Per the issue:

This issue has also come up [here](https://github.com/psf/requests/pull/6667) where the matter was clarified by @tiran in [this comment](https://github.com/psf/requests/pull/6667):
> `SSLContext` is designed to be shared and used for multiple connections. It is thread safe as long as you don't reconfigure it once it is used by a connection. Adding new certs to the internal trust store is fine, but changing ciphers, verification settings, or mTLS certs can lead to surprising behavior. The problem is unrelated to threads and can even occur in a single-threaded program.
(cherry picked from commit 4f59f86382)

Co-authored-by: mm-matthias <43849132+mm-matthias@users.noreply.github.com>
2024-06-16 20:34:18 +00:00
Nyuan Zhang
f774d49b7a
[3.12] gh-120572: add missing parentheses in TypeIs documentation (GH-120573) (#120578) 2024-06-15 23:50:27 -07:00
Miss Islington (bot)
5185951335
[3.12] annotations: expand documentation on "simple" assignment targets (GH-120535) (#120556)
This behavior is rather surprising and it was not clearly specified.

(cherry picked from commit 9e0b11eb21)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-06-15 15:24:21 +00:00
Miss Islington (bot)
4fb2af3195
[3.12] gh-120128: fix description of argument to ipaddress.collapse_addresses() (GH-120131) (#120136)
gh-120128: fix description of argument to ipaddress.collapse_addresses() (GH-120131)

The argument to collapse_addresses() is now described as an *iterable*
(rather than *iterator*).
(cherry picked from commit f878d46e56)

Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net>
2024-06-15 06:12:45 -06:00
Miss Islington (bot)
d2105a1eab
[3.12] gh-120361: Add nonmember test with enum flags inside to test_enum (GH-120364) (#120512)
gh-120361: Add `nonmember` test with enum flags inside to `test_enum` (GH-120364)

* gh-120361: Add `nonmember` test with enum flags inside to `test_enum`
(cherry picked from commit 7fadfd82eb)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-06-14 20:59:12 +03:00
Miss Islington (bot)
c9fc099c59
[3.12] GH-119054: Add "Renaming and deleting" section to pathlib docs. (GH-120465) (#120473)
GH-119054: Add "Renaming and deleting" section to pathlib docs. (GH-120465)

Add dedicated subsection for `pathlib.Path.rename()`, `replace()`,
`unlink()` and `rmdir()`.
(cherry picked from commit d88a1f2e15)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
2024-06-13 20:31:52 +00:00
Barney Gale
eff055340f
[3.12] GH-119054: Add "Creating files and directories" section to pathlib docs. (GH-120186) (#120464)
Add dedicated subsection for `pathlib.Path.touch()`, `mkdir()`,
`symlink_to()` and `hardlink_to()`. Also note that `open()`, `write_text()`
and `write_bytes()` are often used to create files.

(cherry picked from commit c2d810b6d4)
2024-06-13 19:21:27 +01:00
Miss Islington (bot)
89523230d8
[3.12] gh-101575: document Decimal.__round__() (GH-101737) (GH-120395)
gh-101575: document Decimal.__round__() (GH-101737)
(cherry picked from commit 7dd8c37a06)

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
2024-06-13 09:10:17 +02:00
Miss Islington (bot)
319233f137
[3.12] gh-120345: Fix incorrect use of the :class: role with the "()" suffix (GH-120347) (GH-120412)
* Remove "()" when refer to a class as a type.
* Use :func: when refer to a callable.
* Fix reference to the datetime.astimezone() method.
(cherry picked from commit 92c9c6ae14)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-12 14:42:06 +00:00
Miss Islington (bot)
92e1c136b5
[3.12] Fix typo in ElementTree docs (GH-120342) (#120358)
Fix typo in ElementTree docs (GH-120342)
(cherry picked from commit 0335662fe1)

Co-authored-by: naglis <827324+naglis@users.noreply.github.com>
2024-06-11 17:19:06 +00:00
Miss Islington (bot)
b134f47574
[3.12] gh-120276: Fix incorrect email.header.Header maxlinelen default (GH-120277) (GH-120278)
(cherry picked from commit 7c016deae6)

Co-authored-by: Clinton <pygeek@users.noreply.github.com>
2024-06-08 17:26:01 +00:00
Miss Islington (bot)
501cd99c8e
[3.12] gh-110383: Clarify "non-integral" wording in pow() docs (GH-119688) (#120207)
(cherry picked from commit 6646a9da26)

Co-authored-by: Aditya Borikar <adityaborikar2@gmail.com>
2024-06-07 09:53:55 +00:00
Barney Gale
59224b8fdc
[3.12] GH-119054: Add "Reading directories" section to pathlib docs (GH-119956) (#120184)
Add a dedicated subsection for `Path.iterdir()`-related methods,
specifically `iterdir()`, `glob()`, `rglob()` and `walk()`.

(cherry picked from commit 14e1506a6d)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-06-07 01:24:44 +01:00
Alex Waygood
c5d1fbd4ce
[3.12] typing docs: fix indentation of TypedDict deprecation notice (#120124) 2024-06-05 10:37:24 -07:00
Miss Islington (bot)
376c734216
[3.12] gh-119287: clarify doc on BaseExceptionGroup.derive and link to it from contextlib.suppress (GH-119657) (#120106)
gh-119287: clarify doc on BaseExceptionGroup.derive and link to it from contextlib.suppress (GH-119657)
(cherry picked from commit 5c02ea8bae)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-06-05 12:02:52 +00:00
Miss Islington (bot)
c46621bf33
[3.12] gh-120078: Fix struct_time attr typo tm_day -> tm_mday in Doc/library/time.rst (GH-120084)
(cherry picked from commit b6b0dcbfc0)

Co-authored-by: shurj0 <60540027+shurj0@users.noreply.github.com>
2024-06-05 00:29:28 +00:00
Barney Gale
059be67b51
[3.12] GH-119054: Add "Reading and writing files" section to pathlib docs (GH-119524) (#119955)
Add a dedicated subsection for `open()`, `read_text()`, `read_bytes()`,
`write_text()` and `write_bytes()`.

(cherry picked from commit bd6d4ed645)
2024-06-02 21:14:29 +01:00
Barney Gale
85020647c2
[3.12] GH-119054: Add "Querying file type and status" section to pathlib docs (GH-119055) (#119952)
Add a dedicated subsection for `Path.stat()`-related methods, specifically
`stat()`, `lstat()`, `exists()`, `is_*()`, and `samefile()`.

(cherry picked from commit 81d6336230)
2024-06-02 20:38:00 +01:00
Miss Islington (bot)
c8de0ec7b9
[3.12] Improve documentation for typing.get_type_hints (GH-119928) (#119944)
- Explicit list of what it does that is different from
  "just return __annotations__"
- Remove reference to PEP 563; adding the future import doesn't
  do anything to type aliases, and in general it will never make
  get_type_hints() less likely to fail.
- Remove example, as the Annotated docs already have a similar
  example, and it's unbalanced to have one example about this
  one edge case but not about other behaviors of the function.

(cherry picked from commit aa9fe98e06)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-06-02 15:21:47 +00:00
Miss Islington (bot)
60393f5f14
[3.12] Add unique() recipe to itertools docs (gh-119911) (gh-119917) 2024-06-01 12:06:18 -05:00
Miss Islington (bot)
2f7fada580
[3.12] contextlib docs: Clean up redundant 'up' after 'cleanup' (GH-119873)
Reported by Michael Kass on docs@
(cherry picked from commit f3fc800d5f)
2024-05-31 17:27:57 +00:00
Serhiy Storchaka
207d1b032f
[3.12] gh-109218: Improve documentation for the complex() constructor (GH-119687) (ПР-119805)
* Remove the equivalence with real+imag*1j which can be incorrect in corner
  cases (non-finite numbers, the sign of zeroes).
* Separately document the three roles of the constructor: parsing a string,
  converting a number, and constructing a complex from components.
* Document positional-only parameters of complex(), float(), int() and bool()
  as positional-only.
* Add examples for complex() and int().
* Specify the grammar of the string for complex().
* Improve the grammar of the string for float().
* Describe more explicitly the behavior when real and/or imag arguments are
  complex numbers. (This will be deprecated in future.)
(cherry picked from commit ec1ba26460)
2024-05-30 20:52:44 +00:00
Miss Islington (bot)
e408059711
[3.12] subprocess docs: Fix semantically important typo (GH-119752) (#119758)
subprocess docs: Fix semantically important typo (GH-119752)

GH-25416 accidentally replaced a reference to the *stderr* argument of
`subprocess.run` with a reference to the *stdin* argument.  *stdin* is
not affected by the `check_output` option.
(cherry picked from commit 2cc3502f98)

Co-authored-by: Zachary Ware <zach@python.org>
2024-05-30 08:50:23 +01:00