| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
(GH-127558)
(cherry picked from commit 35d37d6592d1be71ea76042165f6cbfa6c4c3a17)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
| |
(cherry picked from commit 33ce8dcf791721fea563715f681dc1593a35b83b)
|
| |
|
|
|
|
|
|
| |
(GH-126667) (#127202)
Doc: C API: Fix `Py_NewInterpreterFromConfig` example code (GH-126667)
(cherry picked from commit e3038e976b25a58f512d8c7083a752c89436eb0d)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
|
| |
|
|
|
|
|
|
|
|
|
| |
(GH-126535) (#126545)
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 e3510bd3dd9ea8f2a30cb1128470aee3a48d8880)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
|
| |
|
|
|
|
|
|
| |
(#126432)
Doc: C API: Delete claim that `PyObject_Init` is GC-aware (GH-126418)
(cherry picked from commit 407c0366d9ccd2a36c6cc8bf92324856b16fd604)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
|
| |
|
|
|
|
|
|
| |
(GH-123904)
gh-123609: Clarify usage of standalone `PyBUF_FORMAT` (GH-123778)
(cherry picked from commit 962304a54ca79da0838cf46dd4fb744045167cdd)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-125737) (#125799)
Doc: C API: Move `tp_dealloc` paragraph to `tp_dealloc` section (GH-125737)
It looks like commit 43cf44ddcce6b225f959ea2a53e4817244ca6054
(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 d880c83ff7fb2e464bc4f469d74cc3fc3eca082c)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
|
| |
|
|
|
|
|
|
| |
(GH-125384) (#125408)
gh-101291: Add versionadded directives for PyUnstable_Long_* (GH-125384)
(cherry picked from commit c6d7b644c2425b397cfb641f336bea70eb8a329a)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
|
| |
|
|
|
|
|
|
| |
(#124709) (#125211)
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>
|
| |
|
|
|
|
|
|
| |
(#125056)
gh-124182: Explain naming rules for struct sequence types (GH-124335)
(cherry picked from commit 3287c834e5370294e310450115290979aac06efa)
Co-authored-by: ffelixg <142172984+ffelixg@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
(gh-124920) (gh-124931)
gh-115145: Update documentation about ``PyThreadState_DeleteCurrent`` (gh-124920)
(cherry picked from commit 9eeb21bf761070649bf8d78976a62dabb6d67a99)
Co-authored-by: Donghee Na <donghee.na@python.org>
|
| |
|
| |
(cherry picked from commit 23fb9f0777b054526b3b32f58e60b2a03132bf45)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
(#124662)
(cherry picked from commit b79a21ea429844e84509430e636d808ea9cff244)
Co-authored-by: Max Bachmann <kontakt@maxbachmann.de>
|
| |
|
|
| |
section of the data model docs (#124480) (#124558)
|
| |
|
|
| |
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
|
| |
|
|
| |
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
|
| |
|
|
| |
(GH-123576)
|
| | |
|
| |
|
|
|
|
|
|
|
| |
(GH-123255) (#123415)
gh-123254: Improve `tuple` C API docs with more info about errors (GH-123255)
(cherry picked from commit 6f563e364d1a7902417573f842019746a79cdc1b)
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
| |
|
|
|
|
| |
(GH-122280) (#122644)
[3.12] gh-122613: Document PyLong_GetInfo() (part of Limited API) (GH-GH-122280)
(cherry picked from commit d91ac525ef166edc0083acf5a96f81b87324fe7f)
|
| |
|
|
|
|
|
|
| |
(GH-122624) (#122659)
gh-122623: Improve `c-api/bytearray.rst` with error handling info (GH-122624)
(cherry picked from commit 151934a324789c58cca9c7bbd6753d735454df5a)
Co-authored-by: sobolevn <mail@sobolevn.me>
|
| |
|
|
|
|
| |
(cherry picked from commit bc264eac3ad14dab748e33b3d714c2674872791f)
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
|
|
| |
(cherry picked from commit 22c9d9c1fcc3bb6186524330b169eda6df450f1b)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
|
|
| |
point" (GH-121907) (GH-122013)
(cherry picked from commit 1a0c7b9ba48a2dffb70bb0c7327abae1d3e87356)
|
| |
|
|
|
|
|
|
| |
* [3.12] gh-121834: Improve `complex` C-API docs (GH-121835)
(cherry picked from commit 72dccd60735b597e99c007a7b69210763a746877)
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-121750) (GH-121753)
(cherry picked from commit 26dfb2771236bfd96cdaa1081103f75141ecff47)
Co-authored-by: Dominic H <dom@dominic.sk>
|
| |
|
|
|
| |
descriptions (GH-121616) (#121619)
(cherry picked from commit e6264b44dc7221c713b14dfa0f5929b33d362829)
|
| |
|
|
|
|
|
|
|
| |
(GH-121568) (#121579)
gh-121567: Improve `slice` C-API docs by mentioning exceptions (GH-121568)
(cherry picked from commit 84a5597b08b7d53aced2fbd0048271ce762807a8)
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
| |
|
|
|
|
|
|
|
| |
(GH-121534) (#121540)
gh-121533: Improve `PyCell_[Get,Set]` docs: mention the exceptions (GH-121534)
(cherry picked from commit 649d5b6d7b04607dd17810ac73e8f16720c6dc78)
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
|
| |
(#121310)
docs: Fix "Py_TPFLAGS_MANAGED_WEAKREF is set in tp_flags" (GH-112237)
(cherry picked from commit 4232976b02cb999335c6bfdec3315520b21954f2)
Co-authored-by: da-woods <dw-git@d-woods.co.uk>
|
| |
|
|
|
|
|
| |
Py_Finalize() (gh-120853)
(cherry picked from commit 03fa2df92707b543c304a426732214002f81d671, AKA gh-120839)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-119475) (#119603)
gh-119467: Fix Py_buffer.format type and correct documentation typo (GH-119475)
(cherry picked from commit 3b26cd8ca0e6c65e4b61effea9aa44d06e926797)
Co-authored-by: Aditya Borikar <adityaborikar2@gmail.com>
|
| |
|
|
| |
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
|
| |
|
|
|
| |
(GH-118794)
(cherry picked from commit 05c2fe1acda9ea5a57061642c36e8b73bb4fbba4)
|
| |
|
|
|
|
|
|
| |
collection (GH-118021) (GH-118092)
gh-116935: Document that heap types need to support garbage collection (GH-118021)
(cherry picked from commit 5d544365742a117027747306e2d4473f3b73d921)
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-117920) (#118087)
gh-117518: Clarify PyTuple_GetItem() borrowed reference in the doc (GH-117920)
(cherry picked from commit 4605a197bd84da1a232bd835d8e8e654f2fef220)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
| |
(GH-117226) (GH-117973)
(cherry picked from commit 438b7c3071eebaccd1ba215f15a239345b22f813)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
| |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
| |
|
|
|
| |
directives (GH-116298) (GH-116450)
(cherry picked from commit 808a77612fb89b125d25efac2788522a100e8a6d)
|
| |
|
|
|
|
| |
closure is not a function pointer, it is a user data pointer.
(cherry picked from commit df594011089a83d151ac7000954665536f3461b5)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
gh-115653: Document PyCode_GetFirstFree() (GH-115654)
Correct the return type of the PyCode_GetNumFree() documentation.
(cherry picked from commit 10fc4675fdb14e19f2fdd15102c6533b9f71e992)
Co-authored-by: Bogdan Romanyuk <65823030+wrongnull@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
(#115589)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
| |
|
|
|
|
|
| |
(GH-113455) (GH-115407)
(cherry picked from commit 5719aa23ab7f1c7a5f03309ca4044078a98e7b59)
Co-authored-by: qqwqqw689 <114795525+qqwqqw689@users.noreply.github.com>
|
| |
|
|
|
|
| |
(#115263)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
| |
|
|
|
|
|
|
| |
(GH-114825) (GH-115308)
(cherry picked from commit e1552fd19de17e7a6daa3c2a6d1ca207bb8eaf8e)
Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
|
| |
|
|
|
| |
(GH-115292)
(cherry picked from commit 573acb30f22a84c0f2c951efa002c9946e29b6a3)
|
| |
|
|
|
| |
(cherry picked from commit 769d4448260aaec687d9306950225316f9faefce)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
|
| |
|
|
|
|
| |
gh-101100: Fix Py_DEBUG dangling Sphinx references (GH-115003)
(cherry picked from commit d0322fdf2c1a7292a43959fe5a572d783b88a1c4)
Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
GH-114925)
GH-69695: Update ``PyImport_ImportModule`` description (GH-103836)
(cherry picked from commit 9872855a31720f514b84373848b49fca09d66ecd)
Co-authored-by: patenaud <33957588+patenaud@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|