Commit graph

12533 commits

Author SHA1 Message Date
Adam Turner
4c0f42bbc6
[3.12] Docs: Avoid the deprecated `.. cmdoption::` directive (GH-110292) (#110302)
[3.12] Docs: Avoid the deprecated ``.. cmdoption::`` directive (GH-110292).
(cherry picked from commit 77e9aae383)
2023-10-03 20:55:29 +03:00
Miss Islington (bot)
90dea557bb
[3.12] gh-109234: Hint to contextlib.closing in sqlite3 context manager docs (GH-109322) (#110294)
(cherry picked from commit 4227bfa8b2)

Co-authored-by: Lincoln <71312724+Lincoln-developer@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-10-03 16:02:44 +00:00
Raymond Hettinger
221c8d64e6
[3.12] Sync factor() recipe with main branch (gh-110231) 2023-10-02 14:19:46 -05:00
Alex Waygood
25bf0564c4
[3.12] Fix typos in docs and comments (#109619) (#109621)
Fix typos in docs and comments (#109619)

Co-authored-by: Heinz-Alexander Fuetterer <35225576+afuetterer@users.noreply.github.com>
2023-10-02 17:34:49 +00:00
Miss Islington (bot)
b61a4da459
[3.12] gh-109590: Update shutil.which on Windows to prefer a PATHEXT extension on executable files (GH-109995) (#110202)
gh-109590: Update shutil.which on Windows to prefer a PATHEXT extension on executable files (GH-109995)

The default arguments for shutil.which() request an executable file, but extensionless files are not executable on Windows and should be ignored.
(cherry picked from commit 29b875bb93)

Co-authored-by: Charles Machalow <csm10495@gmail.com>
2023-10-02 17:48:30 +02:00
Victor Stinner
5245b97e13
[3.12] gh-109649: Enhance os.cpu_count() documentation (#110169)
* gh-109649: Enhance os.cpu_count() documentation

* Doc: Specify that os.cpu_count() counts *logicial* CPUs.
* Doc: Specify that os.sched_getaffinity(0) is related to the calling
  thread.
* Fix test_posix.test_sched_getaffinity(): restore the old CPU mask
  when the test completes!

* Restore removed text
2023-10-02 17:47:57 +02:00
Miss Islington (bot)
b8a30a4365
[3.12] Add example for linear_regression() with proportional=True. (gh-110133) (#110134)
Add example for linear_regression() with proportional=True. (gh-110133)
(cherry picked from commit 613c0d4e86)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2023-10-02 17:47:28 +02:00
Miss Islington (bot)
5ba9d2b98f
[3.12] gh-108973: Fix asyncio test_subprocess_consistent_callbacks() (GH-109431) (#109609)
gh-108973: Fix asyncio test_subprocess_consistent_callbacks() (GH-109431)

SubprocessProtocol process_exited() method can be called before
pipe_data_received() and pipe_connection_lost() methods. Document it
and adapt the test for that.

Revert commit 282edd7b2a.
_child_watcher_callback() calls immediately _process_exited(): don't
add an additional delay with call_soon(). The reverted change didn't
make _process_exited() more determistic: it can still be called
before pipe_connection_lost() for example.

(cherry picked from commit ced6924630)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Davide Rizzo <sorcio@gmail.com>
2023-10-02 17:03:51 +02:00
Miss Islington (bot)
48afd1cf17
[3.12] GH-92584: Move installation schemes overview to sysconfig docs (GH-108018) (#110213)
GH-92584: Move installation schemes overview to sysconfig docs (GH-108018)

* Add new installation path functions subsection

* Add content from install/index to sysconfig

* Fix table

* Update note about installers

* Clean up the list of schemes, remove references to Distutils
(cherry picked from commit f16e81f368)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-10-02 10:50:28 +00:00
Miss Islington (bot)
b0a8cb2901
[3.12] gh-110138: Improve grammar in idiomatic usage of `__main__.py` (GH-110142) (#110188)
gh-110138: Improve grammar in idiomatic usage of ``__main__.py`` (GH-110142)
(cherry picked from commit adf0f15a06)

Co-authored-by: Quentin Agren <quentin.agren@gmail.com>
2023-10-02 12:03:12 +02:00
Hugo van Kemenade
96110e9429
[3.12] gh-101100: Fix sphinx warnings in library/site.rst (GH-110144) (#110187)
(cherry picked from commit 31097df611)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-02 12:02:29 +02:00
Miss Islington (bot)
54ffee0e51
[3.12] GH-101100: Fix reference warnings for `gettext` (GH-110115) (#110140)
GH-101100: Fix reference warnings for ``gettext`` (GH-110115)
(cherry picked from commit 0449fe999d)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-10-02 12:01:26 +02:00
Miss Islington (bot)
8882b30dab
[3.12] gh-109634: Fix :samp: syntax (GH-110073) (#110095)
gh-109634: Fix `:samp:` syntax (GH-110073)
(cherry picked from commit e27adc68cc)

Co-authored-by: Jacob Coffee <jacob@z7x.org>
2023-09-29 15:31:10 +02:00
Miss Islington (bot)
297104cce5
[3.12] gh-101100: Fix sphinx warnings in library/difflib.rst (GH-110074) (#110081)
gh-101100: Fix sphinx warnings in `library/difflib.rst` (GH-110074)
(cherry picked from commit d102d39bbe)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-09-29 15:29:14 +02:00
Miss Islington (bot)
69a9f47125
[3.12] gh-110045: Update symtable module for PEP 695 (GH-110066) (#110070)
gh-110045: Update symtable module for PEP 695 (GH-110066)
(cherry picked from commit 7dc2c5093e)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-09-29 08:10:22 +02:00
Miss Islington (bot)
2c557932e9
[3.12] gh-101100: Fix sphinx warnings in library/devmode.rst (GH-109963) (#109966)
gh-101100: Fix sphinx warnings in `library/devmode.rst` (GH-109963)
(cherry picked from commit d9809e84fb)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-27 17:38:42 +02:00
Hugo van Kemenade
57ff216215
[3.12] gh-101100: Fix Sphinx warnings in Doc/library/weakref.rst (GH-109881) (#109884)
[3.12] gh-101100: Fix Sphinx warnings in `Doc/library/weakref.rst` (GH-109881).
(cherry picked from commit 7c61a361fc)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-09-26 17:03:31 +02:00
Miss Islington (bot)
6f1d4552b3
[3.12] gh-101100: Fix sphinx warnings in Doc/library/xml.etree.elementtree.rst (GH-109799) (#109800)
gh-101100: Fix sphinx warnings in `Doc/library/xml.etree.elementtree.rst` (GH-109799)
(cherry picked from commit 649768fb67)


gh-101100: Fix shpinx warnings in `Doc/library/xml.etree.elementtree.rst`

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-09-24 13:55:28 +02:00
Miss Islington (bot)
2622b13046
[3.12] gh-109634: Use :samp: role (GH-109635) (#109776)
gh-109634: Use :samp: role (GH-109635)
(cherry picked from commit 92af0cc580)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-09-24 13:54:36 +02:00
Miss Islington (bot)
62df559448
[3.12] gh-100228: Document the os.fork threads DeprecationWarning. (GH-109767) (#109773)
* gh-100228: Document the os.fork threads DeprecationWarning. (GH-109767)

Document the `os.fork` posix threads detected `DeprecationWarning` in 3.12 What's New, os, multiprocessing, and concurrent.futures docs.

Many reviews and doc cleanup edits by Adam & Hugo. 🥳

(cherry picked from commit 5e7ea95d9d)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

* link to the discussion thread from whatsnew

Include the link to the discussion in the what's new text per @malemberg's comment on. https://github.com/python/cpython/pull/109767

(i'll follow up with a PR to main to include this edit there as well)

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-24 13:53:56 +02:00
Miss Islington (bot)
0015a9aad5
[3.12] Misc itertool recipe improvements, mostly docstrings and comments (gh-109555) (#109572)
(cherry picked from commit f2636d2c45)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2023-09-22 14:43:40 +02:00
Miss Islington (bot)
fbf703ce6e
[3.12] Fix extraneous backslashes in hashlib docs (GH-109468) (#109530)
Fix extraneous backslashes in hashlib docs (GH-109468)
(cherry picked from commit ce5b3e19e6)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
2023-09-18 12:29:19 +02:00
Miss Islington (bot)
cc12f6684e
[3.12] gh-109451: Fix wrong format specifier in logging documentation (GH-109465) (#109483)
gh-109451: Fix wrong format specifier in logging documentation (GH-109465)
(cherry picked from commit 929cc4e4a0)

Co-authored-by: AlberLC <37489786+AlberLC@users.noreply.github.com>
2023-09-17 22:50:37 +02:00
Miss Islington (bot)
655287996e
[3.12] gh-109414: Add some basic information about venvs in the introduction. (GH-109440) (#109481)
gh-109414: Add some basic information about venvs in the introduction. (GH-109440)
(cherry picked from commit a6846d45ff)

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Co-authored-by: Victor Stinner <vstinner@python.org>
2023-09-17 22:50:12 +02:00
Miss Islington (bot)
e9a90523c9
[3.12] Docs: Superseded modules: list only module names (GH-109439) (#109445)
Docs: Superseded modules: list only module names (GH-109439)
(cherry picked from commit b434dd7e36)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-15 16:11:17 +02:00
Miss Islington (bot)
3bb8075bcb
[3.12] gh-101100: Fix sphinx warnings in turtle.rst (GH-109394) (#109416)
gh-101100: Fix sphinx warnings in `turtle.rst` (GH-109394)
(cherry picked from commit 21e80f4c19)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-09-15 00:41:18 +02:00
Miss Islington (bot)
5b38bdeaf1
[3.12] Fix variable name in dis documentation example (GH-109343) (#109364)
Fix variable name in dis documentation example (GH-109343)

BINARY_SUBSCR example erroneously uses two different names `key` and `index` to refer to the same variable. STORE_SUBSCR and DELETE_SUBSCR use only `key` in the same context. Changing `index` to `key` for consistency.
(cherry picked from commit a0c06a4f93)

Co-authored-by: Oleksandr Kravets <73752159+olekskrav@users.noreply.github.com>
2023-09-13 12:37:46 +02:00
Miss Islington (bot)
47402e235d
[3.12] gh-105189: fix importlib.resources.abc deprecation docs (GH-105232) (#109363)
gh-105189: fix importlib.resources.abc deprecation docs (GH-105232)
(cherry picked from commit 6c0ddca409)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-09-13 12:37:24 +02:00
Irit Katriel
08bd2aa793
[3.12] gh-109184: update traceback module doc w.r.t notes (message is no longer always at the end) (#109201) (#109334)
gh-109184: update traceback module doc w.r.t notes (message is no longer always at the end) (#109201)

(cherry picked from commit 0e76cc359b)
2023-09-13 12:35:26 +02:00
Miss Islington (bot)
778d094126
[3.12] Fix iter_index() to work with lists which do not support stop=None. (gh-109306) (#109310)
Fix iter_index() to work with lists which do not support stop=None. (gh-109306)
(cherry picked from commit f2a55fecd0)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2023-09-12 16:23:20 +02:00
Miss Islington (bot)
8e96b98282
[3.12] gh-107322: zipapp: Remove the suggestion to remove .dist-info directories (GH-107296) (#109281)
gh-107322: zipapp: Remove the suggestion to remove .dist-info directories (GH-107296)

Removed zipapp suggestion to rm .dist-info subdirectories. This totally breaks importlib.metadata
(cherry picked from commit 1ee50e2a78)

Co-authored-by: wim glenn <hey@wimglenn.com>
2023-09-12 16:19:05 +02:00
Miss Islington (bot)
aef019b04a
[3.12] Improve the sieve() recipe in the itertools docs (gh-109199) (#109203)
Improve the sieve() recipe in the itertools docs (gh-109199)

Lazier sieve
(cherry picked from commit d3ed9921cd)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2023-09-12 16:00:33 +02:00
Miss Islington (bot)
fff524ede8
[3.12] Add version directives to ast docs (GH-108788) (#109106)
Add version directives to ast docs (GH-108788)
(cherry picked from commit 74fc96bc60)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-09-08 15:25:55 +02:00
Miss Islington (bot)
b27ca96a0f
[3.12] gh-107924: re-order os.sendfile() flag documentation (GH-107926) (#109099)
gh-107924: re-order os.sendfile() flag documentation (GH-107926)
(cherry picked from commit 403ab1306a)

Co-authored-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-08 15:24:18 +02:00
Miss Islington (bot)
4cb29bb683
[3.12] gh-102823: Document return type of floor division on floats (GH-102824) (#109092)
gh-102823: Document return type of floor division on floats (GH-102824)
(cherry picked from commit b72251de93)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-08 15:23:41 +02:00
Miss Islington (bot)
2ce26121b1
[3.12] socket documentation fix - rename triple to 3-tuple (GH-24722) (#109073)
socket documentation fix - rename triple to 3-tuple (GH-24722)
(cherry picked from commit 6b15ff5235)

Co-authored-by: Ori Hoch <ori@uumpa.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-08 15:23:12 +02:00
Miss Islington (bot)
82f5291a1d
[3.12] gh-71770: Add more details on behavior of configparser's default_section (GH-31562) (#109088)
gh-71770: Add more details on behavior of configparser's default_section (GH-31562)
(cherry picked from commit 891236f482)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-08 15:22:33 +02:00
Miss Islington (bot)
26f42b34f1
[3.12] GH-90915: Document that SystemExit doesn't trigger sys.excepthook (GH-31357) (#109082)
GH-90915: Document that SystemExit doesn't trigger sys.excepthook (GH-31357)
(cherry picked from commit 1294fcede0)

Co-authored-by: Colin Watson <cjwatson@debian.org>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-08 15:22:08 +02:00
Miss Islington (bot)
736c413977
[3.12] bpo-38157: Add example about per file output for mock_open. (GH-16090) (#109071)
bpo-38157: Add example about per file output for mock_open. (GH-16090)
(cherry picked from commit e183a71eef)

Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-08 15:21:51 +02:00
Miss Islington (bot)
eeaae92b49
[3.12] gh-107755: Document the correct default value of slice step (GH-107756) (#108955)
gh-107755: Document the correct default value of slice step (GH-107756)

Document the correct default value of slice step.
(cherry picked from commit 9bf350b066)

Co-authored-by: wim glenn <hey@wimglenn.com>
2023-09-08 15:13:31 +02:00
Hugo van Kemenade
5ca2a68bbe
[3.12] gh-107732: Mention dir support in importlib.resources docs (GH-107734) (#109058)
gh-107732: Mention dir support in importlib.resources docs (#107734)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
(cherry picked from commit 9f0c0a46f0)

Co-authored-by: Shahriar Heidrich <smheidrich@weltenfunktion.de>
2023-09-08 15:12:48 +02:00
Miss Islington (bot)
ef0dbfb5a8
[3.12] GH-108202: Document `calendar`'s command-line interface (GH-109020) (#109030)
GH-108202: Document ``calendar``'s command-line interface (GH-109020)
(cherry picked from commit f0f96a9f40)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-08 15:11:16 +02:00
Miss Islington (bot)
d7869ec22a
[3.12] gh-108857: improve markup in inspect.Signature.replace() docs (GH-108862) (#108971)
gh-108857: improve markup in inspect.Signature.replace() docs (GH-108862)
(cherry picked from commit 6f8411cfd6)

Co-authored-by: nabin2004 <107109731+nabin2004@users.noreply.github.com>
2023-09-06 00:39:21 +00:00
Miss Islington (bot)
578b3ea0e9
[3.12] GH-103082: Document PEP-669: Low Impact Monitoring for CPython (GH-107772) (#108909)
GH-103082: Document PEP-669: Low Impact Monitoring for CPython (GH-107772)
(cherry picked from commit 8b515f60ee)

Co-authored-by: Mark Shannon <mark@hotpy.org>
2023-09-05 15:07:11 +02:00
Miss Islington (bot)
183bb673a8
[3.12] gh-107208: Fix iter_index() recipe to not swallow exceptions (gh-108835) (#108837)
gh-107208: Fix iter_index() recipe to not swallow exceptions (gh-108835)
(cherry picked from commit f373c6b948)


gh-107208: iter_index now supports "stop" and no longer swallows ValueError

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2023-09-04 13:46:35 +02:00
Nikita Sobolev
c5ce34f9b4
[3.12] gh-101100: Fix sphinx warnings in unittest.mock-examples.rst (GH-108810) (#108813)
* [3.12] gh-101100: Fix sphinx warnings in `unittest.mock-examples.rst` (GH-108810).
(cherry picked from commit 5141b1ebe0)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>

* Make the requested changes

---------

Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
2023-09-02 23:46:03 +02:00
Miss Islington (bot)
54e8dd757c
[3.12] gh-101100: Fix sphinx warnings in uuid.rst (GH-108805) (#108807)
* gh-101100: Fix sphinx warnings in `uuid.rst` (GH-108805)

* gh-101100: Fix sphinx warnings in `uuid.rst`

* Use anchors
(cherry picked from commit 21da4980f5)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>

* Fix typo

* another typo

---------

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-09-02 23:45:40 +02:00
Miss Islington (bot)
70a378c888
[3.12] gh-105563: reference DateType in datetime's documentation (GH-105946) (#108789)
gh-105563: reference DateType in datetime's documentation (GH-105946)
(cherry picked from commit 8f9ea43ee8)

Co-authored-by: TATHAGATA ROY <royzen9495@gmail.com>
2023-09-02 23:44:06 +02:00
Miss Islington (bot)
1e15c1501c
[3.12] ast docs: Fix incorrect link on keyword (GH-108728) (#108737)
`ast` docs: Fix incorrect link on `keyword` (GH-108728)

In two places, Sphinx was erroneously adding links to the `keyword` module instead of the `ast.keyword` class
(cherry picked from commit c1e2f3b2f7)

Co-authored-by: Alex Povel <git@alexpovel.de>
2023-09-01 15:32:13 +02:00
Miss Islington (bot)
bc42d6c604
[3.12] gh-101100: Fix sphinx warnings in threading.rst (GH-108684) (#108707)
gh-101100: Fix sphinx warnings in `threading.rst` (GH-108684)
(cherry picked from commit 991e4e76b5)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-08-31 15:32:39 +02:00