summaryrefslogtreecommitdiffstats
path: root/Doc
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] Docs: Update and proofread `library/venv.rst` (GH-124121) (#124680)Hugo van Kemenade2024-09-301-9/+119
| | | | | | | | | | | | | | | | * [3.12] Docs: Update and proofread `library/venv.rst` (GH-124121) (cherry picked from commit 23e812b84ae688a56a1011ed69a0d178c70e35ea) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> * Remove 3.13 docs --------- Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.12] Docs: for for/else clarify that return or raise also skip the else ↵Miss Islington (bot)2024-09-301-2/+4
| | | | | | | | | | (GH-124591) (#124660) Docs: for for/else clarify that return or raise also skip the else (GH-124591) (cherry picked from commit 5329d1b74a86b3a22ff36f7976bfe720ee06d10d) Co-authored-by: Ned Batchelder <ned@nedbatchelder.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] gh-123223: Adding hyperlink of argument in warnings.catch_warnings: ↵Miss Islington (bot)2024-09-301-0/+3
| | | | | | | | (GH-123231) (#124527) gh-123223: Adding hyperlink of argument in warnings.catch_warnings: (GH-123231) (cherry picked from commit 828583a7855f15edc96e6721c226ace098ba463b) Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
* [3.12] Doc: Run HTML and non-HTML daily builds separately (GH-124493) (#124791)Miss Islington (bot)2024-09-301-3/+3
| | | | | | Doc: Run HTML and non-HTML daily builds separately (GH-124493) (cherry picked from commit cce1125574f7b74343afda4bd0030706f67e13df) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.12] Fix `c-api/file.rst` indexes (GH-114608) (#124786)sobolevn2024-09-301-2/+3
| | | (cherry picked from commit 23fb9f0777b054526b3b32f58e60b2a03132bf45)
* [3.12] Docs: improve generic `typing.NamedTuple` example (GH-124739) (#124765)Miss Islington (bot)2024-09-291-1/+3
| | | | | | Docs: improve generic `typing.NamedTuple` example (GH-124739) (cherry picked from commit 76fbee642e78eacf3866102f31e0ac969b57f1e6) Co-authored-by: CBerJun <121291537+CBerJun@users.noreply.github.com>
* [3.12] gh-61181: Fix support of choices with string value in argparse ↵Miss Islington (bot)2024-09-291-1/+1
| | | | | | | | (GH-124578) (GH-124756) Substrings of the specified string no longer considered valid values. (cherry picked from commit f1a2417b9e2993e584610851ac004c8b0599b323) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] docs: improve venv docs (GH-124540) (#124728)Jelle Zijlstra2024-09-281-27/+24
| | | | | | | | | | - Move "versionchanged" notes that apply to the whole class to the end of the class docs - Remove or move notes next to the method list that apply to individual methods. - Mark up parameters using the appropriate syntax - Do not capitalize "boolean" - Shorten some text (cherry picked from commit c976d789a98047ae7ddec6d13c9ea7086d9fa3f9)
* [3.12] Doc: Fix default ``latex_elements['papersize']`` (GH-124525) (#124726)Miss Islington (bot)2024-09-281-2/+2
| | | | | | | | | | | Doc: Fix default ``latex_elements['papersize']`` (GH-124525) https://www.sphinx-doc.org/en/master/latex.htmlGH-the-latex-elements-configuration-setting It should be 'letterpaper' or 'a4paper' not 'letter' or 'a4' (not to be confused with PAPER env variable). (cherry picked from commit fae5058ec13aa3b4f1acc549fadfbbbc2628f1e9) Co-authored-by: Jean-François B <2589111+jfbu@users.noreply.github.com>
* [3.12] gh-90190: Add doc for using `singledispatch` with precise collection ↵Miss Islington (bot)2024-09-271-0/+19
| | | | | | type hints (GH-116544) (#124711) Co-authored-by: Matt Delengowski <matt.delengowski@gmail.com>
* [3.12] gh-113993: Make interned strings mortal (GH-120520, GH-121364, ↵Petr Viktorin2024-09-274-26577/+23675
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GH-121903, GH-122303) (#123065) This backports several PRs for gh-113993, making interned strings mortal so they can be garbage-collected when no longer needed. * Allow interned strings to be mortal, and fix related issues (GH-120520) * Add an InternalDocs file describing how interning should work and how to use it. * Add internal functions to *explicitly* request what kind of interning is done: - `_PyUnicode_InternMortal` - `_PyUnicode_InternImmortal` - `_PyUnicode_InternStatic` * Switch uses of `PyUnicode_InternInPlace` to those. * Disallow using `_Py_SetImmortal` on strings directly. You should use `_PyUnicode_InternImmortal` instead: - Strings should be interned before immortalization, otherwise you're possibly interning a immortalizing copy. - `_Py_SetImmortal` doesn't handle the `SSTATE_INTERNED_MORTAL` to `SSTATE_INTERNED_IMMORTAL` update, and those flags can't be changed in backports, as they are now part of public API and version-specific ABI. * Add private `_only_immortal` argument for `sys.getunicodeinternedsize`, used in refleak test machinery. Make sure the statically allocated string singletons are unique. This means these sets are now disjoint: - `_Py_ID` - `_Py_STR` (including the empty string) - one-character latin-1 singletons Now, when you intern a singleton, that exact singleton will be interned. * Add a `_Py_LATIN1_CHR` macro, use it instead of `_Py_ID`/`_Py_STR` for one-character latin-1 singletons everywhere (including Clinic). * Intern `_Py_STR` singletons at startup. * Beef up the tests. Cover internal details (marked with `@cpython_only`). * Add lots of assertions * Don't immortalize in PyUnicode_InternInPlace; keep immortalizing in other API (GH-121364) * Switch PyUnicode_InternInPlace to _PyUnicode_InternMortal, clarify docs * Document immortality in some functions that take `const char *` This is PyUnicode_InternFromString; PyDict_SetItemString, PyObject_SetAttrString; PyObject_DelAttrString; PyUnicode_InternFromString; and the PyModule_Add convenience functions. Always point out a non-immortalizing alternative. * Don't immortalize user-provided attr names in _ctypes * Immortalize names in code objects to avoid crash (GH-121903) * Intern latin-1 one-byte strings at startup (GH-122303) There are some 3.12-specific changes, mainly to allow statically allocated strings in deepfreeze. (In 3.13, deepfreeze switched to the general `_Py_ID`/`_Py_STR`.) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.12] gh-118181: Fix parameter markup in AST docs (GH-124473). (#124705)Tomas R2024-09-271-6/+6
| | | (cherry picked from commit 09aebb1fbc0c1d771d4942844d5e2077fcdf56c9)
* [3.12] gh-119004: fix a crash in equality testing between `OrderedDict` ↵Miss Islington (bot)2024-09-271-2/+5
| | | | | | | | (GH-121329) (#124508) gh-119004: fix a crash in equality testing between `OrderedDict` (GH-121329) (cherry picked from commit 38a887dc3ec52c4a7222279bf4b3ca2431b86de9) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.12] Fixup indentation for docs on `ModuleSpec` attributes (#124681) (#124686)Alex Waygood2024-09-271-43/+36
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] GH-95079: document error behaviour for some unicode C APIs (GH-95080) ↵Miss Islington (bot)2024-09-271-0/+9
| | | | | | | (#124662) (cherry picked from commit b79a21ea429844e84509430e636d808ea9cff244) Co-authored-by: Max Bachmann <kontakt@maxbachmann.de>
* [3.12] gh-115528: Update language reference for PEP 646 (GH-121181) (#124633)Miss Islington (bot)2024-09-262-17/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gh-115528: Update language reference for PEP 646 (GH-121181) To recap: the objective is to make starred expressions valid in `subscription`, which is used for generics: `Generic[...]`, `list[...]`, etc. What _is_ gramatically valid in such contexts? Seemingly any of the following. (At least, none of the following throw `SyntaxError` in a 3.12.3 REPL.) Generic[x] Generic[*x] Generic[*x, y] Generic[y, *x] Generic[x := 1] Generic[x := 1, y := 2] So introducting flexible_expression: expression | assignment_expression | starred_item end then switching `subscription` to use `flexible_expression` sorts that. But then we need to field `yield` - for which any of the following are apparently valid: yield x yield x, yield x, y yield *x, yield *x, *y Introducing a separate `yield_list` is the simplest way I've been figure out to do this - separating out the special case of `starred_item ,`. (cherry picked from commit 7d3497f617edf77cb6ead6f5e62bce98d77b9ab8) Co-authored-by: Matthew Rahtz <matthew.rahtz@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] Programming FAQ: Mention object.__setattr__ as a technique for ↵Miss Islington (bot)2024-09-261-3/+10
| | | | | | delegation (GH-124617) (#124625) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] Doc: Use the short version for daily downloads (GH-124602) (#124611)Miss Islington (bot)2024-09-261-1/+1
| | | | | | Doc: Use the short version for daily downloads (GH-124602) (cherry picked from commit 2c472d36b776636fb00881a717f69e43672588b1) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.12] gh-123560: Correct docs for "empty" format type for floats ↵Miss Islington (bot)2024-09-261-3/+5
| | | | | | | | (GH-123561) (#124597) gh-123560: Correct docs for "empty" format type for floats (GH-123561) (cherry picked from commit 274d9ab619b8150a613275835234ea9ef935f21f) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
* [3.12] gh-124234: Improve docs for `Mock.reset_mock` (GH-124237) (#124592)Miss Islington (bot)2024-09-261-10/+33
| | | | | | gh-124234: Improve docs for `Mock.reset_mock` (GH-124237) (cherry picked from commit 19fed6cf6eb51044fd0c02c6338259e2dd7fd462) Co-authored-by: sobolevn <mail@sobolevn.me>
* [3.12] Doc: Improve documentation for the ``path`` argument in ↵Tom Most2024-09-261-5/+7
| | | | ``shutil.which()`` (GH-124494) (#124576)
* [3.12] gh-101100: Make __subclasses__ doctest stable (GH-124577) (#124580)Jelle Zijlstra2024-09-261-2/+4
| | | | | | Using a standard library class makes this test difficult to maintain as other tests and other parts of the stdlib may create subclasses, which may still be alive when this test runs depending on GC timing. (cherry picked from commit 08a467b537b3d9b499d060697e79b3950374ab0f)
* [3.12] For-else deserves its own section in the tutorial (GH-123946) (#124563)Miss Islington (bot)2024-09-261-31/+54
| | | | | | (cherry picked from commit ffdc80e93d9d947531fa0123e5b392c6f1fd9136) Co-authored-by: Ned Batchelder <ned@nedbatchelder.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] gh-123242: Note that type.__annotations__ may not exist (GH-124557) ↵Jelle Zijlstra2024-09-251-0/+8
| | | | | | | | (#124562) Closes GH-123242. The real criterion is that the attribute does not exist on heap types, but I don't think we should discuss heap vs. static types in the language reference. (cherry picked from commit 99b23c64de301c9e77add6b0d8e60118ef807840)
* [3.12] gh-101100: Add a table of class attributes to the "Custom classes" ↵Alex Waygood2024-09-2539-181/+225
| | | | section of the data model docs (#124480) (#124558)
* [3.12] Doc: Use ``major.minor`` for documentation distribution archive ↵Miss Islington (bot)2024-09-252-12/+14
| | | | | | | | filenames (GH-124489) (#124535) Doc: Use ``major.minor`` for documentation distribution archive filenames (GH-124489) (cherry picked from commit 6318ffcba21f8fc155f5558237ab03aa45f0e174) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.12] gh-108951: Document how to terminate an asyncio.TaskGroup (GH-123837) ↵Miss Islington (bot)2024-09-251-0/+47
| | | | | | | | | | | | (#123957) gh-108951: Document how to terminate an asyncio.TaskGroup (GH-123837) We don't want to add another API, since the recipe is straightforward and rarely needed. The advantage is that we could backport this to the earliest Python version that has taskgroups (3.11, alas in security mode already, so we'll just do 3.12 and 3.13). (cherry picked from commit ef05801ba0cbf090034df17e2a0420fb42c2d538) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.12] gh-123445: calendar: Improve descriptions for day and month ↵Miss Islington (bot)2024-09-251-4/+20
| | | | | | | | | | | attributes (GH-123483) (#124501) gh-123445: calendar: Improve descriptions for day and month attributes (GH-123483) (cherry picked from commit 8447c933da308939b06e33544ca9abc9fc46aa8b) Co-authored-by: Mat S <mscull@gmail.com> Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com> Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.12] GH-87358: Add clarification about nargs and default argparse ↵Miss Islington (bot)2024-09-241-0/+3
| | | | | | behaviour (GH-124094) (#124441) Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
* [3.12] gh-124120: Document `Annotated.__origin__` (GH-124125) (#124417)Miss Islington (bot)2024-09-241-0/+18
| | | | | | | | gh-124120: Document `Annotated.__origin__` (GH-124125) (cherry picked from commit faef3fa653f2901cc905f98eae0ddcd8dc334d33) Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Brian Schubert <brianm.schubert@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-65169: Clarify prog default in argparse (GH-31602) (GH-124431)Miss Islington (bot)2024-09-241-4/+5
| | | | | (cherry picked from commit e69ff34e81eceb69de6623205c87e0145f1831e4) Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
* [3.12] Docs: Update two FAQs for Python 3 (GH-124247) (GH-124256)Miss Islington (bot)2024-09-242-8/+6
| | | | | | (cherry picked from commit 5f011115943933ff36adf997c886d73ea88003fb) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] Bump Ruff to 0.6.7 (#124384) (#124391)Alex Waygood2024-09-231-4/+1
|
* [3.12] Doc: Add ``make dist-no-html`` (GH-124383) (#124388)Miss Islington (bot)2024-09-232-2/+32
|
* [3.12] GH-109975: Copyedit 3.13 What's New: Copyedit C API deprecations ↵Adam Turner2024-09-233-59/+112
| | | | | pending removal (GH-124336) (#124365) (cherry picked from commit e7d465a607b77a552d1e07f3fafa81ef5fc799d2)
* [3.12] GH-79714: Add mention of stderr for clarity to ArgumentParser.exit() ↵Savannah Ostrowski2024-09-231-4/+4
| | | | | | (GH-123932) (GH-124356) (cherry picked from commit 5f5c0b9c23238dc0a1fdb764f625ae0cc5604519)
* [3.12] Replace the term `Immutable` with a `Hashable` in the `sequence` ↵Miss Islington (bot)2024-09-231-1/+1
| | | | | | | | | | entry of the Glossary (GH-124350) (#124353) Replace the term `Immutable` with a `Hashable` in the `sequence` entry of the Glossary (GH-124350) The term `Immutable` in the `sequence` entry of the glossary is used incorrectly, in fact dicts accepts hashable keys, which is not the same as immutable. (cherry picked from commit 6203ef35dd4ee9dd59759ce83eace8eacac69685) Co-authored-by: decorator-factory <42166884+decorator-factory@users.noreply.github.com>
* [3.12] Fix doctrees directory for the gettext builder (GH-122997) (#124339)Miss Islington (bot)2024-09-231-1/+1
| | | | | | Fix doctrees directory for the gettext builder (GH-122997) (cherry picked from commit 315a933a5b3ae4379077096b6852f85a81a7d75f) Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
* [3.12] gh-124130: Notes on empty string corner case of category `\B` ↵Miss Islington (bot)2024-09-231-0/+6
| | | | | | | | | | (GH-124133) (#124329) gh-124130: Notes on empty string corner case of category `\B` (GH-124133) (cherry picked from commit d3e79d75d164c338a64fd66edb26e69c501cee58) Signed-off-by: y5c4l3 <y5c4l3@proton.me> Co-authored-by: Y5 <124019959+y5c4l3@users.noreply.github.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.12] Fix typo in XMLParser doc (GH-124129) (#124281)Miss Islington (bot)2024-09-201-1/+1
| | | | | | Fix typo in XMLParser doc (GH-124129) (cherry picked from commit 622368d99c986ca1a9bdba951ac53f42d7ee6fca) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* [3.12] Fix `make htmllive` target (GH-124222)Miss Islington (bot)2024-09-181-1/+1
| | | | | | | | | Allow `make -C Doc htmllive` to work without manual venv activation Set PATH to ensure that `sphinx-autobuild` can find `sphinx-build`. (cherry picked from commit 9a6e2336e4b54fc13064b77826a67b03b3b45133) Authored-by: Zachary Ware <zach@python.org>
* [3.12] gh-124194: Fix wrong issue number in What's New in Python 3.8 ↵Miss Islington (bot)2024-09-181-1/+1
| | | | | | | | | (GH-124195) (#124198) gh-124194: Fix wrong issue number in What's New in Python 3.8 (GH-124195) (cherry picked from commit d8c0fe1944ac41787e16fa60e608f56c8235e100) Co-authored-by: Bradley Reynolds <bradley.reynolds@darbia.dev> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.12] GH-103484: Fix broken links reported by linkcheck (GH-124169) (#124180)Miss Islington (bot)2024-09-176-6/+6
| | | | | | GH-103484: Fix broken links reported by linkcheck (GH-124169) (cherry picked from commit ab80c6b402eeec379315fa3df111f6bec2de6900) Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
* [3.12] Use pep role instead of url (GH-121611) (#124173)Miss Islington (bot)2024-09-1710-40/+35
| | | | Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
* [3.12] GH-103484: Fix permanently redirects reported by linkcheck ↵Miss Islington (bot)2024-09-1715-24/+28
| | | | | | | | (GH-124144) (GH-124152) Fix redirects reported by linkcheck, update docs conf.py checks. (cherry picked from commit 0a32c6959c265d21d7c43fe8e4aefc8c0983e85e) Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
* [3.12] GH-103484: Tell linkcheck to ignore debian manpage redirects ↵Miss Islington (bot)2024-09-161-0/+2
| | | | | | | | (GH-123019) (#124136) GH-103484: Tell linkcheck to ignore debian manpage redirects (GH-123019) (cherry picked from commit 1054a755a3016f95fcd24b3ad20e8ed9048b7939) Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
* [3.12] Docs: Drop letter PDF (GH-123912) (#123999)Miss Islington (bot)2024-09-162-16/+1
| | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.12] Normalize cdecl formatting as found elsewhere on ctypes.rst ↵Miss Islington (bot)2024-09-131-1/+1
| | | | | | (GH-121379) (#124057) Co-authored-by: utkonos <utkonos@users.noreply.github.com>
* [3.12] gh-118577: Clarify that inspect.BoundArguments prefers to put values ↵Miss Islington (bot)2024-09-121-1/+2
| | | | | | | in args (GH-119936) (GH-124004) (cherry picked from commit 8e99495701737c9d9706622f59581213ef163b23) Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
* [3.12] gh-123905: Update TOML description to include version number ↵Miss Islington (bot)2024-09-111-1/+1
| | | | (GH-123906) (#123907)