Commit graph

12981 commits

Author SHA1 Message Date
Miss Islington (bot)
cde9a26eb5
[3.12] Docs: Use cross-reference to os.uname in sysconfig.get_platform (GH-122083) (#122172)
Docs: Use cross-reference to `os.uname` in `sysconfig.get_platform` (GH-122083)
(cherry picked from commit 498cb6dff1)

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
2024-07-23 13:14:50 +00:00
Łukasz Langa
c1e834dd78
[3.12] gh-121957: Emit audit events for python -i and python -m asyncio (GH-122117) 2024-07-22 13:41:23 +02:00
Russell Keith-Magee
71970d602f
[3.12] Docs: spelling and grammar fixes (GH-122084) (#122107)
(cherry picked from commit bc264eac3a)

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-21 18:39:48 -07:00
Miss Islington (bot)
9343c6d323
[3.12] Delete stale note about mp.Lock.acquire/SIGINT (GH-120929) (GH-122079)
Delete stale note about mp.Lock.acquire/SIGINT (GH-120929)
(cherry picked from commit 0dcbc83853)

Co-authored-by: Andrey Mishchenko <mishchea@gmail.com>
2024-07-21 06:24:56 +00:00
Miss Islington (bot)
5f46a726ea
[3.12] gh-121977: Add tips for handling unhashable data (GH-122075) (#122077)
gh-121977: Add tips for handling unhashable data (GH-122075)
(cherry picked from commit ebc18abbf3)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2024-07-21 06:00:20 +00:00
Miss Islington (bot)
0298da432d
[3.12] Docs: Fix duplicate object description warnings (GH-122068) (#122070)
Docs: Fix duplicate object description warnings (GH-122068)
(cherry picked from commit 8db5f48007)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-20 19:54:57 +00:00
Pablo Galindo Salgado
a9daa4fd04
[3.12] gh-121130: Fix f-string format specifiers with debug expressions (GH-121150) (#122063) 2024-07-20 19:05:01 +02:00
Miss Islington (bot)
3f72821f80
[3.12] gh-59022: Added tests for pkgutil.extend_path (GH-121673) (GH-121950)
This adds tests for the documented behaviour of `pkgutil.extend_path`
regarding different argument types as well as for `*.pkg` files.
(cherry picked from commit 8f2532168b)

Co-authored-by: Andreas Stocker <andreas@stocker.co.it>
2024-07-19 16:36:26 +02:00
Petr Viktorin
e80497c9cd
[3.12] gh-121160: Note that readline libraries using different history formats. (GH-121327) (GH-122031)
This is not something we can do too much about, without help from the
underlying libraries.
(cherry picked from commit 709db44255)
2024-07-19 14:13:34 +00:00
Serhiy Storchaka
39dea212f4
[3.12] gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) (GH-122013)
(cherry picked from commit 1a0c7b9ba4)
2024-07-19 09:08:33 +00:00
Miss Islington (bot)
b1c31a1547
[3.12] gh-65453: Docs - clarify AttributeError behaviour on PropertyMock (GH-121666) (GH-121969)
Fixed at EuroPython 24 sprints.
(cherry picked from commit 94e6644584)

Co-authored-by: Vlastimil Zíma <ziima@users.noreply.github.com>
2024-07-19 10:03:54 +02:00
Miss Islington (bot)
eedb44e490
[3.12] Docs: Fix typo in description of `INTRINSIC_ASYNC_GEN_WRAP` (GH-122004) (#122007)
Docs: Fix typo in description of ``INTRINSIC_ASYNC_GEN_WRAP`` (GH-122004)
(cherry picked from commit 98e5bdef0e)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-07-19 07:36:09 +00:00
Miss Islington (bot)
f88ec9a203
[3.12] gh-64308: Remove TestProgram from the unittest docs (GH-121675) (GH-121743)
gh-64308: Remove TestProgram from the unittest docs (GH-121675)
(cherry picked from commit f6f4022a35)

Co-authored-by: Jan Musílek <jan.musilek@nic.cz>
2024-07-18 15:27:01 +02:00
Miss Islington (bot)
1d915aaf5c
[3.12] gh-121874: Define audit-event open parameters consistently (GH-121883) (GH-121955)
Use same names for parameters to avoid triggering a race-condition in Sphinx
that causes non-deterministic output.
(cherry picked from commit 24cf867bed)

Co-authored-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
2024-07-18 10:12:40 +00:00
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