summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/weakref.rst
Commit message (Collapse)AuthorAgeFilesLines
* [3.13] gh-118789: Add `PyUnstable_Object_ClearWeakRefsNoCallbacks` ↵Miss Islington (bot)2024-06-181-0/+16
| | | | | | | | | | | | | | | | | (GH-118807) (#120695) This exposes `PyUnstable_Object_ClearWeakRefsNoCallbacks` as an unstable C-API function to provide a thread-safe mechanism for clearing weakrefs without executing callbacks. Some C-API extensions need to clear weakrefs without calling callbacks, such as after running finalizers like we do in subtype_dealloc. Previously they could use `_PyWeakref_ClearRef` on each weakref, but that's not thread-safe in the free-threaded build. (cherry picked from commit e8752d7b80775ec2a348cd4bf38cbe26a4a07615) Co-authored-by: Sam Gross <colesbury@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.13] docs: fix a few typos identified by codespell (GH-119516) (#119570)Miss Islington (bot)2024-05-261-2/+2
| | | | Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
* gh-105927: PyWeakref_GetRef() returns 1 on success (#106561)Victor Stinner2023-07-091-2/+4
| | | | | | PyWeakref_GetRef() now returns 1 on success, and return 0 if the reference is dead. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-105927: Deprecate PyWeakref_GetObject() function (#106006)Victor Stinner2023-06-261-0/+6
| | | Deprecate PyWeakref_GetObject() and PyWeakref_GET_OBJECT() functions.
* gh-105927: Add PyWeakref_GetRef() function (#105932)Victor Stinner2023-06-211-8/+19
| | | | Add tests on PyWeakref_NewRef(), PyWeakref_GetObject(), PyWeakref_GET_OBJECT() and PyWeakref_GetRef().
* gh-101100: Test docs in nit-picky mode (#102513)Hugo van Kemenade2023-03-241-0/+10
| | | | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* Docs: remove redundant "adverb-adjective" hyphens from compound modifiers ↵Ned Batchelder2022-07-051-2/+2
| | | | | (GH-94551) Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021
* gh-89653: PEP 670: Amend docs (GH-91813)Erlend Egeberg Aasland2022-04-221-2/+1
|
* bpo-42528: Improve the docs of most Py*_Check{,Exact} API calls (GH-23602)Antonio Cuni2021-01-061-3/+4
| | | | | I think that none of these API calls can fail, but only few of them are documented as such. Add the sentence "This function always succeeds" (which is the same already used e.g. by PyNumber_Check) to all of them.
* bpo-42294: Grammar fixes in doc glossary strong/weak refs (GH-23227)kj2020-11-101-1/+1
|
* bpo-42294: Add borrowed/strong reference to doc glossary (GH-23206)Victor Stinner2020-11-091-3/+3
| | | | | | Add "borrowed reference" and "strong reference" to the documentation glossary. Enhance also Py_INCREF() and Py_NewRef() documentation.
* bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950)Serhiy Storchaka2019-10-301-4/+4
| | | | Replace all *NULL* with ``NULL``.
* Doc: Replace the deprecated highlightlang directive by highlight. (#13377)Stéphane Wirtel2019-05-171-1/+1
| | | | highlightlang is deprecated since April 2018 in Sphinx. See https://github.com/sphinx-doc/sphinx/pull/4845
* demote this to a noteBenjamin Peterson2011-06-011-1/+1
|
* Migrate to Sphinx 1.0 C language constructs.Georg Brandl2010-10-061-9/+9
|
* #8578: mention danger of not incref'ing weak referenced object.Georg Brandl2010-08-021-1/+8
|
* Split C API docs in Py3k branch.Georg Brandl2008-01-201-0/+62