Commit Graph

28501 Commits

Author SHA1 Message Date
Miss Islington (bot) 2019362d95
[3.13] Doc: Upgrade Sphinx to 8.1 (GH-125276) (#125278)
Doc: Upgrade Sphinx to 8.1 (GH-125276)
(cherry picked from commit dd0ee201da)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-10 20:31:40 +00:00
Miss Islington (bot) 319305c0bf
[3.13] Note argparse exit code in documentation (GH-119568) (GH-125274)
(cherry picked from commit 3b87fb74c9)

Co-authored-by: Justin Kunimune <justinkunimune@gmail.com>
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
2024-10-10 21:18:17 +03:00
Miss Islington (bot) 47ad32d158
[3.13] gh-71784: [doc] add usage examples for traceback.TracebackException (GH-125189) (#125247)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-10-10 10:46:31 +00:00
Adam Turner abb01fd938
[3.13] GH-121970: Extract ``availability`` into a new extension (GH-125082) (#125237)
(cherry picked from commit cbfd392479)
2024-10-10 10:43:43 +00:00
Alex Waygood aa4da1e468
[3.13] gh-101100: Consolidate documentation on `ModuleType` attributes (#124709) (#125208)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Barry Warsaw <barry@python.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-10-09 20:03:30 +01:00
Miss Islington (bot) 47fa3f44ef
[3.13] docs: in venv table use executable name (GH-124315) (GH-125172)
(cherry picked from commit 7f93dbf6fe)
2024-10-09 17:54:15 +01:00
Miss Islington (bot) ab5f1790d0
[3.13] gh-101100: Fix Sphinx warnings in `library/unittest.mock.rst` (GH-124106) (#125190)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-10-09 14:13:23 +00:00
Miss Islington (bot) b6c17eb76f
[3.13] Fix importlib.resources issue reference in 3.13 What's New (GH-125175) (#125184)
Previous link was to the PR that removed the
mentioned importlib.resources APIs, rather than
the issue that added back their improved forms.

(cherry picked from commit 7a303fc78a)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2024-10-09 22:45:03 +10:00
Savannah Ostrowski 5f2a5ac9dc
[3.13] GH-124478: Cleanup argparse documentation (GH-124877) (#125162)
(cherry picked from commit 37228bd16e)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2024-10-08 16:20:01 -07:00
Miss Islington (bot) 21a99add45
[3.13] Misc improvements to the itertools docs (gh-125147) (gh-125149) 2024-10-08 14:37:13 -05:00
Raymond Hettinger 988cdccbe0
[3.13] Itertool docs: Minor clarifications, wording tweaks, spacing, and active voice. (gh-124690) (gh-125148)
Minor clarifications, wording tweaks, spacing, and active voice.
2024-10-08 14:29:15 -05:00
Raymond Hettinger 7bc99dd49e
[3.13] Tee of tee was not producing n independent iterators (gh-123884) (gh-125081) 2024-10-08 14:11:43 -05:00
Miss Islington (bot) f5fea4dec6
[3.13] gh-124832: Add a note to indicate that `datetime.now` may return the same instant (GH-124834) (#125145)
gh-124832: Add a note to indicate that `datetime.now` may return the same instant (GH-124834)

* Update datetime.rst

* Update datetime.rst

replace warning with note

* Update Doc/library/datetime.rst



* Update Doc/library/datetime.rst



---------

(cherry picked from commit 760b1e103a)

Co-authored-by: spacemanspiff2007 <10754716+spacemanspiff2007@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-10-08 18:26:07 +00:00
Jelle Zijlstra 089c6d2961
[3.13] gh-112433 add versionadded for `ctypes.Structure._align_` (GH-125087) (#125113)
(cherry picked from commit 5967dd8a4d)

Co-authored-by: monkeyman192 <monkey_man_192@yahoo.com.au>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2024-10-08 14:24:27 +00:00
Miss Islington (bot) 0a63c66035
[3.13] Doc: Improve description of ``GET_LEN`` opcode (GH-114583) (#125102)
Doc: Improve description of ``GET_LEN`` opcode (GH-114583)
(cherry picked from commit e8773e59a8)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-10-08 12:30:52 +00:00
Alyssa Coghlan 64391363ed
[3.13] bpo-34206: Improve docs and test coverage for pre-init functions (GH-8023) (#125092)
- move the Py_Main documentation from the very high level API section
  to the initialization and finalization section
- make it clear that it encapsulates a full Py_Initialize/Finalize
  cycle of its own
- point out that exactly which settings will be read and applied
  correctly when Py_Main is called after a separate runtime
  initialization call is version dependent
- be explicit that Py_IsInitialized can be called prior to
  initialization
- actually test that Py_IsInitialized can be called prior to
  initialization
- flush stdout in the embedding tests that run code so it appears
  in the expected order when running with "-vv"
- make "-vv" on the subinterpreter embedding tests less spammy

---------

(cherry picked from commit 7c4b6a68f2)

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-10-08 09:30:06 +00:00
Miss Islington (bot) 0e0a2dadec
[3.13] gh-70870: Clarify dual usage of 'free variable' (GH-122545) (#125088)
The term "free variable" has unfortunately become genuinely
ambiguous over the years (presumably due to the names of
some relevant code object instance attributes).

While we can't eliminate that ambiguity at this late date, we can
at least alert people to the potential ambiguity by describing
both the formal meaning of the term and the common
alternative use as a direct synonym for "closure variable".

---------

(cherry picked from commit 27390990fa)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-10-08 17:58:47 +10:00
Miss Islington (bot) 1e820e63e7
[3.13] gh-124653: Relax (again) detection of queue API for logging handlers (GH-124897) (GH-125059)
(cherry picked from commit 7ffe94fb24)
2024-10-08 07:23:40 +01:00
Miss Islington (bot) d869d54962
[3.13] gh-125018: Fix role syntax (GH-125050) (#125080)
gh-125018: Fix role syntax (GH-125050)
(cherry picked from commit 10094a533a)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-08 01:23:19 +00:00
Alyssa Coghlan b0d01a1513
[3.13] gh-125018: Add importlib.metadata semantic link targets (GH-125027) (#125047)
gh-125018: Add importlib.metadata semantic link targets (#125027)

This allows direct intersphinx references to APIs via references
like `` :func:`importlib.metadata.version` ``.

(cherry picked from commit cda3b5a576)

---------

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-08 02:16:10 +01:00
Miss Islington (bot) 12bb9ed279
[3.13] Docs: make a tutorial example more precise (GH-125066) (#125078)
(cherry picked from commit 6e3c70c61b)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2024-10-08 02:15:42 +01:00
Emily Morehouse 9a1b9d5254
[3.13] gh-125072: Add label for assignment expressions; update tracked section for assignment expression topic (GH-125074) (#125077)
(cherry picked from commit 447a15190d)
2024-10-08 02:14:34 +01:00
Raymond Hettinger 84efcecf03
[3.13] Small improvements to the itertools docs (GH-123885) (#125075) 2024-10-07 23:08:09 +00:00
Miss Islington (bot) 566983dd12
[3.13] gh-124182: Explain naming rules for struct sequence types (GH-124335) (#125057)
gh-124182: Explain naming rules for struct sequence types (GH-124335)
(cherry picked from commit 3287c834e5)

Co-authored-by: ffelixg <142172984+ffelixg@users.noreply.github.com>
2024-10-07 23:47:30 +02:00
Miss Islington (bot) 4a9a359f32
[3.13] gh-61181: Fix support of choices with string value in argparse (GH-124578) (GH-124755)
Substrings of the specified string no longer considered valid values.
(cherry picked from commit f1a2417b9e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-08 00:28:17 +03:00
Miss Islington (bot) 8c80a26078
[3.13] GH-109975: Announce final release in What's New in Python 3.13 (GH-125007) (#125033)
Prepare What's New in Python 3.13 for final release
(cherry picked from commit 31516c98dd)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-07 04:48:13 +00:00
Miss Islington (bot) 626b4a824e
[3.13] gh-125025: `_thread` docs: fix/update the *caveats* list (GH-125026) (#125032)
gh-125025: `_thread` docs: fix/update the *caveats* list (GH-125026)
(cherry picked from commit 1e098dc766)

Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net>
2024-10-06 21:43:16 -07:00
Miss Islington (bot) d7e4c790ff
[3.13] Doc: Simplify the definition of 'soft deprecated' (GH-124988) (#125029)
Doc: Simplify the definition of 'soft deprecated' (GH-124988)
(cherry picked from commit feca4cf64e)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-10-06 16:04:43 -07:00
Miss Islington (bot) dd4e62e35f
[3.13] gh-109975: Suggest ``pynntp`` instead of ``nntplib`` (GH-124830) (#124966)
gh-109975: Suggest ``pynntp`` instead of ``nntplib`` (GH-124830)

The ``nntplib`` library has been deleted from PyPI by its author.
(cherry picked from commit ac9648243d)

Co-authored-by: Christian Clauss <cclauss@me.com>
2024-10-04 15:31:51 -07:00
Miss Islington (bot) 45dedab674
[3.13] Highlight `datetime.timedelta.seconds` vs `.total_seconds()` in docs. (GH-124811) (#124862)
Highlight `datetime.timedelta.seconds` vs `.total_seconds()` in docs. (GH-124811)

Thanks to the reviewers for suggesting the use of a "caution" section instead of "warning" or "note".
(cherry picked from commit d150e4abcf)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-10-03 09:25:12 -07:00
Miss Islington (bot) 4ff32aac9e
[3.13] gh-124370: Add "howto" for free-threaded Python (GH-124371) (#124860)
gh-124370: Add "howto" for free-threaded Python (GH-124371)
(cherry picked from commit 68e384c217)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: mpage <mpage@cs.stanford.edu>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-10-03 09:24:42 -07:00
Miss Islington (bot) 1869e82757
[3.13] GH-109975: Copyedit 3.13 What's New: Link to installing free-threaded binaries on macOS (GH-124831) (#124833)
GH-109975: Copyedit 3.13 What's New: Link to installing free-threaded binaries on macOS (GH-124831)
(cherry picked from commit 4129a74a37)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-03 09:21:38 -07:00
Miss Islington (bot) ceb90d8d04
[3.13] GH-109975: Copyedit 3.13 What's New: Note delayed expected release date for Python 3.13.0 (GH-124827) (#124828)
GH-109975: Copyedit 3.13 What's New: Note delayed expected release date for Python 3.13.0 (GH-124827)

Note delayed expected release date of 3.13.0
(cherry picked from commit 8823690264)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-03 09:20:28 -07:00
Miss Islington (bot) 4392c5980d
[3.13] Doc: Fix archive filenames for standard builds (GH-124826) (#124836)
Doc: Fix archive filenames for standard builds (GH-124826)
(cherry picked from commit 91e64be731)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-03 09:19:14 -07:00
Miss Islington (bot) bde4ae10ba
[3.13] gh-115145: Update documentation about ``PyThreadState_DeleteCurrent`` (gh-124920) (#124930)
gh-115145: Update documentation about ``PyThreadState_DeleteCurrent`` (gh-124920)
(cherry picked from commit 9eeb21bf76)

Co-authored-by: Donghee Na <donghee.na@python.org>
2024-10-03 08:54:56 -07:00
T. Wouters e0eb44ad49
[3.13] GH-124567: Revert the Incremental GC in 3.13 (#124770)
Revert the incremental GC in 3.13, since it's not clear that without further turning, the benefits outweigh the costs.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-09-30 21:27:29 +00:00
Miss Islington (bot) bc1fae89af
[3.13] Doc: Run HTML and non-HTML daily builds separately (GH-124493) (#124790)
Doc: Run HTML and non-HTML daily builds separately (GH-124493)
(cherry picked from commit cce1125574)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-09-30 13:59:53 -07:00
Miss Islington (bot) fe58596cce
[3.13] Doc: Fix default ``latex_elements['papersize']`` (GH-124525) (#124725)
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 fae5058ec1)

Co-authored-by: Jean-François B <2589111+jfbu@users.noreply.github.com>
2024-09-29 21:23:06 -07:00
Serhiy Storchaka 5bf32d1300
[3.13] gh-123339: Fix cases of inconsistency of __module__ and __firstlineno__ in classes (GH-123613) (#124735)
* Setting the __module__ attribute for a class now removes the
  __firstlineno__ item from the type's dict.
* The _collections_abc and _pydecimal modules now completely replace the
  collections.abc and decimal modules after importing them. This
  allows to get the source of classes and functions defined in these
  modules.
* inspect.findsource() now checks whether the first line number for a
  class is out of bound.
(cherry picked from commit 69a4063ca5)
2024-09-29 21:21:40 -07:00
Alex Waygood 67aa68f1b4
[3.13] Bump Ruff to 0.6.7 (#124384) (#124389)
Bump Ruff to 0.6.7 (#124384)
2024-09-29 18:04:56 -07:00
Miss Islington (bot) e8980b17bb
[3.13] gh-124385: Document and soft-deprecate PyLong_AS_LONG (GH-124386) (#124719)
gh-124385: Document and soft-deprecate PyLong_AS_LONG (GH-124386)
(cherry picked from commit 425587a110)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-09-29 17:59:54 -07:00
Miss Islington (bot) f8e3de8c7d
[3.13] docs: improve venv docs (GH-124540) (#124727)
docs: improve venv docs (GH-124540)

- 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 c976d789a9)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-09-29 17:58:32 -07:00
Miss Islington (bot) e532760f46
[3.13] Docs: improve generic `typing.NamedTuple` example (GH-124739) (#124764)
Docs: improve generic `typing.NamedTuple` example (GH-124739)
(cherry picked from commit 76fbee642e)

Co-authored-by: CBerJun <121291537+CBerJun@users.noreply.github.com>
2024-09-29 17:53:13 -07:00
Miss Islington (bot) 7c7e01c2a1
[3.13] gh-124720: Update "Using Python on a Mac" document (GH-124721) (#124775)
gh-124720: Update "Using Python on a Mac" document (GH-124721)

Update "Using Python on a Mac" section of the "Python Setup and Usage"
document and include information on installing free-threading support.
(cherry picked from commit 4b83c03ce9)

Co-authored-by: Ned Deily <nad@python.org>
2024-09-29 17:52:31 -07:00
Emily Morehouse 0a125d9029
[3.13] gh-81263: Add assignment expressions to `help` (GH-124641) (#124713)
gh-81263: Add assignment expressions to `help` (#124641)

* Add assignment expression (:=) to `help`

* Update index for Assignment Expressions to include pair of `assignment; expression`
2024-09-27 15:21:58 -07:00
Miss Islington (bot) 5c5f02753a
[3.13] doc: PyUnicode_AsUTF8String() fails if string contains surrogates (GH-124605) (#124707)
doc: PyUnicode_AsUTF8String() fails if string contains surrogates (GH-124605)
(cherry picked from commit d8cf587dc7)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-09-27 15:20:44 -07:00
Miss Islington (bot) 2b74cce521
[3.13] gh-90190: Add doc for using `singledispatch` with precise collection type hints (GH-116544) (#124710)
gh-90190: Add doc for using `singledispatch` with precise collection type hints (GH-116544)
(cherry picked from commit 2357d5ba48)

Co-authored-by: Matt Delengowski <matt.delengowski@gmail.com>
2024-09-27 21:28:30 +00:00
Miss Islington (bot) ec4d7b5d22
[3.13] gh-124520: What's New entry for ctypes metaclass __new__/__init__ change (GH-124546) (#124708)
gh-124520: What's New entry for ctypes metaclass __new__/__init__ change (GH-124546)
(cherry picked from commit 3387f76b8f)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-09-27 14:23:16 -07:00
Miss Islington (bot) cf98f39103
[3.13] GH-65961: Document the deprecation of `__package__` and `__cached__` (GH-124377) (#124380)
* GH-65961: Document the deprecation of `__package__` and `__cached__` (GH-124377)

The code changes for warning related to `__package__` landed in Python 3.12. `__cached__` doesn't have any changes as it isn't used but only set by the import system.
(cherry picked from commit 67201ad53f)

---------

Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Barry Warsaw <barry@python.org>
2024-09-27 18:53:35 +00:00
Miss Islington (bot) c6c3d970ba
[3.13] gh-119004: fix a crash in equality testing between `OrderedDict` (GH-121329) (#124507)
gh-119004: fix a crash in equality testing between `OrderedDict` (GH-121329)
(cherry picked from commit 38a887dc3e)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-09-27 11:34:48 -07:00