cpython/Doc/c-api
Miss Islington (bot) aa2ecef22a
[3.12] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) (#107752)
* gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552)

PEP 683 (immortal objects) revealed some ways in which the Python documentation has been unnecessarily coupled to the implementation details of reference counts.  In the end users should focus on reference ownership, including taking references and releasing them, rather than on how many reference counts an object has.

This change updates the documentation to reflect that perspective.  It also updates the docs relative to immortal objects in a handful of places.
(cherry picked from commit 5dc825d504)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>

* Fix a typo.

---------

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2023-08-08 16:25:35 +02:00
..
abstract.rst bpo-41103: Resurrect the old buffer protocol. (GH-27437) 2021-07-29 12:46:47 +02:00
allocation.rst [3.12] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) (#107752) 2023-08-08 16:25:35 +02:00
apiabiversion.rst [3.12] gh-107298: Fix Sphinx warnings in the C API doc (GH-107302) (GH-107375) 2023-07-28 06:40:16 +00:00
arg.rst [3.12] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) (#107752) 2023-08-08 16:25:35 +02:00
bool.rst [3.12] gh-101100: Sphinx warnings: pick the low hanging fruits (GH-107386) (GH-107419) 2023-07-29 09:16:27 +03:00
buffer.rst [3.12] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) (#107752) 2023-08-08 16:25:35 +02:00
bytearray.rst GH-97950: Use new-style index directive ('object') (#104158) 2023-05-04 13:04:41 +03:00
bytes.rst [3.12] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) (#107752) 2023-08-08 16:25:35 +02:00
call.rst [3.12] Fix PyVectorcall_Function doc versionadded (GH-107140) (#107173) 2023-07-24 13:06:16 +00:00
capsule.rst [3.12] gh-107298: Fix yet more Sphinx warnings in the C API doc (GH-107345) (GH-107380) 2023-07-28 08:20:53 +00:00
cell.rst [3.12] gh-107298: Fix Sphinx warnings in the C API doc (GH-107302) (GH-107375) 2023-07-28 06:40:16 +00:00
code.rst [3.12] Fix the documentation for PyCode_New add qualname parameter (GH-107186) (#107440) 2023-07-29 17:52:17 +00:00
codec.rst [3.12] gh-107298: Fix doc references to undocumented modules (GH-107300) (GH-107370) 2023-07-28 06:17:49 +00:00
complex.rst [3.12] gh-107298: Fix more Sphinx warnings in the C API doc (GH-107329) (GH-107376) 2023-07-28 09:56:52 +03:00
concrete.rst GH-97950: Use new-style index directive ('object') (#104158) 2023-05-04 13:04:41 +03:00
contextvars.rst bpo-43959: clarify the documentation of the PyContextVar C-API (GH-25671) 2021-04-28 07:03:19 -07:00
conversion.rst [3.12] gh-107298: Fix more Sphinx warnings in the C API doc (GH-107329) (GH-107376) 2023-07-28 09:56:52 +03:00
coro.rst bpo-42528: Improve the docs of most Py*_Check{,Exact} API calls (GH-23602) 2021-01-06 12:38:26 +01:00
datetime.rst gh-90359: Unify documentation style for datetime.rst (gh-94836) 2022-07-14 09:40:10 +09:00
descriptor.rst bpo-40170: Convert PyDescr_IsData() to static inline function (GH-24535) 2021-02-16 08:50:00 +01:00
dict.rst [3.12] gh-106033: [docs] Improve C API GetItem & HasAttr notes. (GH-106047) (#106070) 2023-06-24 16:30:27 -07:00
exceptions.rst [3.12] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) (#107752) 2023-08-08 16:25:35 +02:00
file.rst [3.12] gh-106919: Use role :c:macro: for referencing the C "constants" (GH-106920) (GH-106951) 2023-07-21 14:48:15 +03:00
float.rst [3.12] gh-106919: Use role :c:macro: for referencing the C "constants" (GH-106920) (GH-106951) 2023-07-21 14:48:15 +03:00
frame.rst [3.12] gh-105196: Fix indentations of section headings in C API docs (GH-105672) (#105782) 2023-06-14 22:30:00 -05:00
function.rst GH-97950: Use new-style index directive ('object') (#104158) 2023-05-04 13:04:41 +03:00
gcsupport.rst [3.12] gh-107298: Fix more Sphinx warnings in the C API doc (GH-107329) (GH-107376) 2023-07-28 09:56:52 +03:00
gen.rst bpo-42528: Improve the docs of most Py*_Check{,Exact} API calls (GH-23602) 2021-01-06 12:38:26 +01:00
import.rst [3.12] gh-107298: Fix more Sphinx warnings in the C API doc (GH-107329) (GH-107376) 2023-07-28 09:56:52 +03:00
index.rst bpo-36763: Implement the PEP 587 (GH-13592) 2019-05-27 16:39:22 +02:00
init.rst [3.12] gh-107306: Add a Doc Entry for Py_mod_multiple_interpreters (GH-107403) (gh-107521) 2023-07-31 23:15:13 +00:00
init_config.rst [3.12] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) (#107752) 2023-08-08 16:25:35 +02:00
intro.rst [3.12] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) (#107752) 2023-08-08 16:25:35 +02:00
iter.rst More minor fixes to C API docs (GH-31525) 2022-04-02 12:31:05 -07:00
iterator.rst [3.12] gh-107298: Fix Sphinx warnings in the C API doc (GH-107302) (GH-107375) 2023-07-28 06:40:16 +00:00
list.rst GH-97950: Use new-style index directive ('builtin') (#104164) 2023-05-06 06:54:08 +03:00
long.rst [3.12] gh-106919: Use role :c:macro: for referencing the C "constants" (GH-106920) (GH-106951) 2023-07-21 14:48:15 +03:00
mapping.rst [3.12] gh-101100: Fix some broken sphinx references (GH-107095) (#107103) 2023-07-23 12:00:31 +02:00
marshal.rst [3.12] gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185) (#105218) 2023-06-02 08:24:25 +00:00
memory.rst [3.12] gh-105766: Document that Custom Allocators Must Be Thread-Safe (gh-107519) (gh-107522) 2023-07-31 17:25:18 -06:00
memoryview.rst GH-97950: Use new-style index directive ('object') (#104158) 2023-05-04 13:04:41 +03:00
method.rst [3.12] gh-107091: Fix the use of some C domain roles (GH-107092) (GH-107113) 2023-07-23 14:50:21 +03:00
module.rst [3.12] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) (#107752) 2023-08-08 16:25:35 +02:00
none.rst [3.12] gh-107298: Fix yet more Sphinx warnings in the C API doc (GH-107345) (GH-107380) 2023-07-28 08:20:53 +00:00
number.rst GH-97950: Use new-style index directive ('builtin') (#104164) 2023-05-06 06:54:08 +03:00
objbuffer.rst bpo-41103: Resurrect the old buffer protocol. (GH-27437) 2021-07-29 12:46:47 +02:00
object.rst [3.12] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) (#107752) 2023-08-08 16:25:35 +02:00
objimpl.rst Doc: Replace the deprecated highlightlang directive by highlight. (#13377) 2019-05-17 15:25:34 +05:30
perfmaps.rst gh-103295: expose API for writing perf map files (#103546) 2023-05-21 11:12:24 +01:00
refcounting.rst [3.12] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) (#107752) 2023-08-08 16:25:35 +02:00
reflection.rst bpo-46836: Add Doc/c-api/frame.rst (GH-32051) 2022-03-23 13:19:13 +01:00
sequence.rst [3.12] gh-101100: Fix some broken sphinx references (GH-107095) (#107103) 2023-07-23 12:00:31 +02:00
set.rst [3.12] gh-107298: Fix yet more Sphinx warnings in the C API doc (GH-107345) (GH-107380) 2023-07-28 08:20:53 +00:00
slice.rst [3.12] gh-106919: Use role :c:macro: for referencing the C "constants" (GH-106920) (GH-106951) 2023-07-21 14:48:15 +03:00
stable.rst [3.12] gh-106919: Use role :c:macro: for referencing the C "constants" (GH-106920) (GH-106951) 2023-07-21 14:48:15 +03:00
structures.rst [3.12] gh-107298: Fix more Sphinx warnings in the C API doc (GH-107329) (GH-107376) 2023-07-28 09:56:52 +03:00
sys.rst [3.12] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) (#107752) 2023-08-08 16:25:35 +02:00
tuple.rst [3.12] gh-107298: Docs: add targets for some :c:member: and :c:macro: references (GH-107316) (GH-107332) 2023-07-27 09:37:54 +03:00
type.rst [3.12] gh-107298: Fix yet more Sphinx warnings in the C API doc (GH-107345) (GH-107380) 2023-07-28 08:20:53 +00:00
typehints.rst [3.12] gh-107298: Fix Sphinx warnings in the C API doc (GH-107302) (GH-107375) 2023-07-28 06:40:16 +00:00
typeobj.rst [3.12] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) (#107752) 2023-08-08 16:25:35 +02:00
unicode.rst [3.12] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) (#107752) 2023-08-08 16:25:35 +02:00
utilities.rst gh-103295: expose API for writing perf map files (#103546) 2023-05-21 11:12:24 +01:00
veryhigh.rst [3.12] gh-107091: Fix some uses of :attr: role (GH-107318) (GH-107330) 2023-07-27 09:24:18 +03:00
weakref.rst [3.12] gh-107298: Fix Sphinx warnings in the C API doc (GH-107302) (GH-107375) 2023-07-28 06:40:16 +00:00