Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Docs C API: Clarify what happens when null bytes are passed to `PyUnicode_AsUTF8` (GH-127458)
(cherry picked from commit e792f4bc2e)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Stan U. <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Add versionadded annotation to use_system_logger feature.
(cherry picked from commit 51216857ca)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Adds a `use_system_log` config item to enable stdout/stderr redirection for
Apple platforms. This log streaming is then used by a new iOS test runner
script, allowing the display of test suite output at runtime. The iOS test
runner script can be used by any Python project, not just the CPython test
suite.
(cherry picked from commit 2041a95e68)
fix param type in PyObject_HasAttrWithError (docs) (GH-127403)
(cherry picked from commit 3afb639f39)
Co-authored-by: biggus-developerus <74741815+biggus-developerus@users.noreply.github.com>
Doc: C API: Fix `Py_NewInterpreterFromConfig` example code (GH-126667)
(cherry picked from commit e3038e976b)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
Doc: C API: `PyThreadState::on_delete` was removed in v3.13 (GH-126536)
(cherry picked from commit 9bca3ef575)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
Doc: C API: Demote sections to subsections for consistency (GH-126535)
The entire file should be a single section; the headings below the
first heading should be subsections.
(cherry picked from commit e3510bd3dd)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
Doc: C API: Delete claim that `PyObject_Init` is GC-aware (GH-126418)
(cherry picked from commit 407c0366d9)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
It looks like commit 43cf44ddcc
(gh-31501) accidentally moved the paragraph to the `tp_finalize`
section when the intent was to move it to the `tp_dealloc` section
(according to the commit message).
(cherry picked from commit d880c83ff7)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
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>
- 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-115145: Update documentation about ``PyThreadState_DeleteCurrent`` (gh-124920)
(cherry picked from commit 9eeb21bf76)
Co-authored-by: Donghee Na <donghee.na@python.org>
gh-124385: Document and soft-deprecate PyLong_AS_LONG (GH-124386)
(cherry picked from commit 425587a110)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
GH-95079: document error behaviour for some unicode C APIs (GH-95080)
(cherry picked from commit b79a21ea42)
Co-authored-by: Max Bachmann <kontakt@maxbachmann.de>
Use pep role instead of url (GH-121611)
(cherry picked from commit 33eeccf6d4)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
* [3.13] GH-109975: Copyedit 3.13 What's New: C API (GH-124313)
(cherry picked from commit 9d0a75269c)
* gh-118915: Add/fix docs entries for some new 3.13 C API (GH-124134)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
gh-123254: Improve `tuple` C API docs with more info about errors (GH-123255)
(cherry picked from commit 6f563e364d)
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>