Commit graph

26938 commits

Author SHA1 Message Date
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
Victor Stinner
de0202e937
[3.12] gh-108740: Fix "make regen-all" race condition (#108741) (#109019)
gh-108740: Fix "make regen-all" race condition (#108741)

Fix a race condition in "make regen-all". The deepfreeze.c source and
files generated by Argument Clinic are now generated or updated
before generating "global objects". Previously, some identifiers may
miss depending on the order in which these files were generated.

* "make regen-global-objects": Make sure that deepfreeze.c is
  generated and up to date, and always run "make clinic".
* "make clinic" no longer runs generate_global_objects.py script.
* "make regen-deepfreeze" now only updates deepfreeze.c (C file).
  It doesn't build deepfreeze.o (object) anymore.
* Remove misleading messages in "make regen-global-objects" and
  "make clinic". They are now outdated, these commands are now
  safe to use.
* Document generates files in Doc/using/configure.rst.

Co-authored-by: Erlend E. Aasland <erlend@python.org>
(cherry picked from commit db1ee6a19a)
2023-09-08 15:19:20 +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)
19d822681b
[3.12] GH-90690: Mention removal of `PRECALL` in What's New (GH-103910) (#109027)
GH-90690: Mention removal of ``PRECALL`` in What's New (GH-103910)
(cherry picked from commit f9bd6e49ae)

Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
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:10:18 +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
Mark Shannon
7ee021f999
[3.12] GH-108390: Prevent non-local events being set with sys.monitoring.set_local_events() (GH-108420) (#108899)
* GH-108390: Prevent non-local events being set with `sys.monitoring.set_local_events()` (GH-108420)

* Restore generated objects

* Restore size of monitoring arrays in code object for 3.12 ABI compatibility.

* Update ABI file
2023-09-05 11:29:38 +00:00
Miss Islington (bot)
8c551a7f2a
[3.12] Link to PEP sections in What's New in 3.12 (GH-108878) (#108890)
Link to PEP sections in What's New in 3.12 (GH-108878)
(cherry picked from commit 7855d325e6)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-05 12:52:36 +02:00
Miss Islington (bot)
331b0267e2
[3.12] Resolve reference warnings in faq/gui.rst (GH-108147) (#108193)
* Resolve reference warnings in faq/gui.rst (GH-108147)
(cherry picked from commit 8f3d09bf5d)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

* Resolve reference warnings in faq/gui.rst

---------

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-04 18:40:59 +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
Serhiy Storchaka
246cb64984
[3.12] Improve some C API documentation (GH-108768) (#108785)
* Express functions which take argument as a C string in terms of
  functions which take Python object.
* Use "note" directive for PyMapping_HasKey() and
  PyMapping_HasKeyString() notes..
(cherry picked from commit 6f97eeec22)
2023-09-02 23:43:41 +02:00
Hugo van Kemenade
f58617a3bc
[3.12] gh-101100: Fix sphinx warnings in tutorial/appendix.rst (GH-108750) (#108759)
(cherry picked from commit 3047f09490)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-09-02 23:42:40 +02:00
Miss Islington (bot)
712994e1ab
[3.12] gh-101100: Fix sphinx warnings in tutorial/classes.rst (GH-108746) (#108756)
gh-101100: Fix sphinx warnings in `tutorial/classes.rst` (GH-108746)
(cherry picked from commit e775601ef1)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-09-01 15:33:36 +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)
8c3793a539
[3.12] gh-108682: [Enum] raise TypeError if super().__new__ called in custom __new__ (GH-108704) (#108733)
gh-108682: [Enum] raise TypeError if super().__new__ called in custom __new__ (GH-108704)

When overriding the `__new__` method of an enum, the underlying data type should be created directly; i.e. .

    member = object.__new__(cls)
    member = int.__new__(cls, value)
    member = str.__new__(cls, value)

Calling `super().__new__()` finds the lookup version of `Enum.__new__`, and will now raise an exception when detected.
(cherry picked from commit d48760b2f1)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-09-01 00:04:55 +02:00
Miss Islington (bot)
a92c60c99b
[3.12] gh-97850: Note in py312 whatsnew that importlib.util.set_loader and importlib.util.module_for_loader have been removed (GH-108719) (#108723)
gh-97850: Note in py312 whatsnew that `importlib.util.set_loader` and `importlib.util.module_for_loader` have been removed (GH-108719)

Note in py312 whatsnew that `importlib.util.set_loader` and `importlib.util.module_for_loader` have been removed
(cherry picked from commit 013a99a47b)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-09-01 00:03:02 +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
Miss Islington (bot)
420db1027b
[3.12] gh-101100: Fix Sphinx warnings in the Logging Cookbook (GH-108678) (#108680)
gh-101100: Fix Sphinx warnings in the Logging Cookbook (GH-108678)
(cherry picked from commit c7cef54631)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-08-30 15:21:58 +02:00
Miss Islington (bot)
2e60d58fff
[3.12] Fix typo in multiprocessing docs (GH-108666) (#108677)
Fix typo in multiprocessing docs (GH-108666)
(cherry picked from commit 38ab0dba80)

Co-authored-by: kato8966 <66937409+kato8966@users.noreply.github.com>
2023-08-30 15:21:32 +02:00
Miss Islington (bot)
ecabf1e19f
[3.12] gh-108669: unittest: Fix documentation for TestResult.collectedDurations (GH-108670) (#108672)
gh-108669: unittest: Fix documentation for TestResult.collectedDurations (GH-108670)
(cherry picked from commit 6c484c39be)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2023-08-30 15:21:05 +02:00
Miss Islington (bot)
1d6d05aa82
[3.12] Mention Ellipsis pickling in the docs (GH-103660) (#108661)
Mention Ellipsis pickling in the docs (GH-103660)
(cherry picked from commit 14ec0bb7c3)

Co-authored-by: sterliakov <50529348+sterliakov@users.noreply.github.com>
2023-08-30 15:20:45 +02:00
Erlend E. Aasland
036dd6958a
[3.12] gh-107801: Improve the accuracy of io.IOBase.seek docs (#108268) (#108655)
(cherry picked from commit 8178a88bd8)

- Add param docstrings
- Link to os.SEEK_* constants
- Mention the return value in the initial paragraph

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-29 22:19:08 +02:00
Miss Islington (bot)
ae9bbd16d8
[3.12] Fix misc doc typos (GH-108592) (#108594)
Fix misc doc typos (GH-108592)
(cherry picked from commit 88f1c5b454)

Co-authored-by: xzmeng <aumo@foxmail.com>
2023-08-29 12:38:03 +02:00
Adam Turner
7c7b2bfb3f
[3.12] GH-108202: Combine documentation of `calendar` constants (GH-108492) (#108579)
[3.12] GH-108202: Combine documentation of ``calendar`` constants (GH-108492).
(cherry picked from commit 5d936b6479)
2023-08-29 00:26:48 +02:00
Miss Islington (bot)
5531d03d99
[3.12] Fix typo in typing docs: Remove redundant backtick (GH-108559) (#108560)
Fix typo in typing docs: Remove redundant backtick (GH-108559)
(cherry picked from commit 72b615ab01)

Co-authored-by: nikkie <takuyafjp+develop@gmail.com>
2023-08-29 00:24:41 +02:00
Erlend E. Aasland
f90099c3bd
[3.12] gh-107801: Document io.TextIOWrapper.tell (#108265) (#108547)
(cherry picked from commit 38afa4af9b)
2023-08-28 01:59:48 +02:00
Miss Islington (bot)
311fd96dae
[3.12] Docs: Resolve Sphinx warnings in dis.rst (GH-108476) (#108546)
Docs: Resolve Sphinx warnings in dis.rst (GH-108476)

- Link to the code objects reference
- Suppress link to deliberately undocumented builtins.__build_class__
- Suppress links for example methods
(cherry picked from commit cb1184280b)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-08-28 01:59:35 +02:00
Miss Islington (bot)
752d5254f5
[3.12] Fix grammatical error in stringprep documentation (GH-108414) (#108537)
Fix grammatical error in stringprep documentation (GH-108414)

Remove the word "them", which didn't make grammatical sense.

(cherry picked from commit cd0a8aece9)

Co-authored-by: Matthew James Kraai <kraai@ftbfs.org>
Co-authored-by: KRAAI, MATTHEW [VISUS] <mkraai@its.jnj.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-27 17:00:07 +02:00
Miss Islington (bot)
0b0238d6a1
[3.12] gh-105052:update timeit function's description (GH-105060) (#108534)
gh-105052:update timeit function's description (GH-105060)

---------

(cherry picked from commit 7096a2be33)

Co-authored-by: R <cherrymelon@foxmail.com>
2023-08-27 16:15:01 +02:00
Miss Islington (bot)
387cb9f324
[3.12] gh-107453: Document errno.{ECANCELED,EOWNERDEAD,ENOTRECOVERABLE,ENOTSUP} (GH-107486) (#108529)
gh-107453: Document errno.{ECANCELED,EOWNERDEAD,ENOTRECOVERABLE,ENOTSUP} (GH-107486)
(cherry picked from commit 1ac64237e6)

Co-authored-by: qqwqqw689 <114795525+qqwqqw689@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-27 16:13:26 +02:00
Miss Islington (bot)
208741cc30
[3.12] gh-102211: Document re.{Pattern,Match}’s existence (GH-102212) (#108490)
gh-102211: Document `re.{Pattern,Match}`’s existence (GH-102212)
(cherry picked from commit 6895ddf6cb)

Co-authored-by: Philipp A <flying-sheep@web.de>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-27 01:21:24 +02:00
Miss Islington (bot)
ce37fbc778
[3.12] Docs: Datamodel: Merge "Notes on using __slots__" with the parent section (GH-108400) (#108474)
Docs: Datamodel: Merge "Notes on using __slots__" with the parent section (GH-108400)
(cherry picked from commit 7f5b1a0661)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-25 18:23:11 +02:00
Miss Islington (bot)
334da81992
[3.12] Datamodel: Add headings to the standard type hierarchy (GH-108146) (#108477)
Datamodel: Add headings to the standard type hierarchy (GH-108146)

Dedent content according to the new layout.
(cherry picked from commit 2b7bff0655)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-25 18:22:45 +02:00
Miss Islington (bot)
c5448ab6d4
[3.12] GH-108202: Document `calendar` exceptions (GH-108398) (#108467)
GH-108202: Document ``calendar`` exceptions (GH-108398)
(cherry picked from commit 135098743a)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-25 18:20:38 +02:00
Victor Stinner
9a225d7d5b
[3.12] gh-108314: PyDict_GetItemString() mentions UTF-8 (#108448)
gh-108314: PyDict_GetItemString() mentions UTF-8

PyDict_GetItemString(), PyDict_SetItemString() and
PyDict_DelItemString() expects a UTF-8 encoding string for the key.
2023-08-25 18:19:53 +02:00
Miss Islington (bot)
09487a202f
[3.12] gh-107432 Update Porting Python 2 Code to Python 3 how-to (GH-107434) (#108409)
gh-107432 Update Porting Python 2 Code to Python 3 how-to (GH-107434)

https://docs.python.org/3/howto/pyporting.htmlGH-porting-python-2-code-to-python-3 was written for another time. In this patch:

- material that frames Python 3 as "new" is removed
- descriptions and directions have been trimmed
(cherry picked from commit 809ea7c4b6)

Co-authored-by: Daniele Procida <daniele@vurt.org>
2023-08-24 12:30:57 +02:00
Miss Islington (bot)
b312d4fd7e
[3.12] gh-70766: Mention the object getstate caveat in 3.11 What's new. (GH-108379) (#108384)
gh-70766: Mention the object getstate caveat in 3.11 What's new. (GH-108379)
(cherry picked from commit b6be18812c)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-08-24 01:44:50 +02:00
Miss Islington (bot)
3aa7df6544
[3.12] gh-108267: Dataclasses docs: Fix object.__setattr__ typo (GH-108355) (#108358)
gh-108267: Dataclasses docs: Fix object.__setattr__ typo (GH-108355)

Fixed a sentence in dataclasses.rst

Changed "__setattr__" to "object.__setattr__" in a section that was specifically supposed to refer to the __setattr__ method of the object class. Also suppressed the link to the data model docs for __setattr__, since we're talking about a specific __setattr__ implementation, not __setattr__ methods in general.
(cherry picked from commit 79fdacc005)

Co-authored-by: FrozenBob <30644137+FrozenBob@users.noreply.github.com>
2023-08-23 13:46:03 +02:00
Miss Islington (bot)
314c98d293
[3.12] gh-107136: Remove Plausible for docs metrics (GH-107856) (#108334)
(cherry picked from commit fc23f34cc9)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-08-23 11:01:19 +02:00