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>
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>
- 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>
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>
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>
Substrings of the specified string no longer considered valid values.
(cherry picked from commit f1a2417b9e)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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>
gh-125025: `_thread` docs: fix/update the *caveats* list (GH-125026)
(cherry picked from commit 1e098dc766)
Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net>
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>
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>
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>
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>
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>
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>
gh-115145: Update documentation about ``PyThreadState_DeleteCurrent`` (gh-124920)
(cherry picked from commit 9eeb21bf76)
Co-authored-by: Donghee Na <donghee.na@python.org>
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>
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>
* 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)
gh-124385: Document and soft-deprecate PyLong_AS_LONG (GH-124386)
(cherry picked from commit 425587a110)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
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>
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>
gh-81263: Add assignment expressions to `help` (#124641)
* Add assignment expression (:=) to `help`
* Update index for Assignment Expressions to include pair of `assignment; expression`
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>
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>
* 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>
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>