Sam Gross
e8752d7b80
gh-118789: Add `PyUnstable_Object_ClearWeakRefsNoCallbacks` ( #118807 )
...
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.
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-06-18 09:57:23 -04:00
Ned Batchelder
d25954dff5
docs: fix a few typos identified by codespell ( #119516 )
2024-05-25 18:13:31 -07:00
Victor Stinner
ee46cb6aa9
gh-105927: PyWeakref_GetRef() returns 1 on success ( #106561 )
...
PyWeakref_GetRef() now returns 1 on success, and return 0 if the
reference is dead.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-09 15:50:26 +00:00
Victor Stinner
c075a1974b
gh-105927: Deprecate PyWeakref_GetObject() function ( #106006 )
...
Deprecate PyWeakref_GetObject() and PyWeakref_GET_OBJECT() functions.
2023-06-26 12:10:53 +02:00
Victor Stinner
9c44656feb
gh-105927: Add PyWeakref_GetRef() function ( #105932 )
...
Add tests on PyWeakref_NewRef(), PyWeakref_GetObject(),
PyWeakref_GET_OBJECT() and PyWeakref_GetRef().
2023-06-21 11:40:09 +02:00
Hugo van Kemenade
6a1c49a717
gh-101100: Test docs in nit-picky mode ( #102513 )
...
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2023-03-24 13:23:35 +02:00
Ned Batchelder
3440d197a5
Docs: remove redundant "adverb-adjective" hyphens from compound modifiers (GH-94551)
...
Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021
2022-07-05 11:16:10 +02:00
Erlend Egeberg Aasland
1218061609
gh-89653: PEP 670: Amend docs (GH-91813)
2022-04-22 14:59:18 +02:00
Antonio Cuni
315fc52db1
bpo-42528: Improve the docs of most Py*_Check{,Exact} API calls (GH-23602)
...
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.
2021-01-06 12:38:26 +01:00
kj
78ba7c69ad
bpo-42294: Grammar fixes in doc glossary strong/weak refs (GH-23227)
2020-11-11 00:56:55 +01:00
Victor Stinner
23c5f93b83
bpo-42294: Add borrowed/strong reference to doc glossary (GH-23206)
...
Add "borrowed reference" and "strong reference" to the documentation
glossary.
Enhance also Py_INCREF() and Py_NewRef() documentation.
2020-11-09 13:40:47 +01:00
Serhiy Storchaka
25fc088607
bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950)
...
Replace all *NULL* with ``NULL``.
2019-10-30 12:03:20 +02:00
Stéphane Wirtel
cbb6484573
Doc: Replace the deprecated highlightlang directive by highlight. ( #13377 )
...
highlightlang is deprecated since April 2018 in Sphinx.
See https://github.com/sphinx-doc/sphinx/pull/4845
2019-05-17 15:25:34 +05:30
Benjamin Peterson
2e3a38a774
demote this to a note
2011-05-31 21:27:41 -05:00
Georg Brandl
60203b41b0
Migrate to Sphinx 1.0 C language constructs.
2010-10-06 10:11:56 +00:00
Georg Brandl
502c3eb52f
#8578 : mention danger of not incref'ing weak referenced object.
2010-08-02 17:49:25 +00:00
Georg Brandl
54a3faae08
Split C API docs in Py3k branch.
2008-01-20 09:30:57 +00:00