Skip to content

Commit 7dae484

Browse files
committed
gh-151945: fix Sphinx warnings arising from stable_abi.dat
1 parent cfe3e07 commit 7dae484

3 files changed

Lines changed: 35 additions & 0 deletions

File tree

Doc/c-api/intro.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,22 @@ use them.
919919
See :pep:`353` for details. ``PY_SSIZE_T_MAX`` is the largest positive value
920920
of type :c:type:`Py_ssize_t`.
921921

922+
.. c:type:: Py_intptr_t
923+
924+
A signed integral type such that a legitimate ``void*`` can be cast to
925+
:c:type:`Py_intptr_t` and then back to ``void*`` again without loss of
926+
information.
927+
928+
Kept for backwards compatibility; prefer using ``intptr_t`` directly.
929+
930+
.. c:type:: Py_uintptr_t
931+
932+
An unsigned integral type such that a legitimate ``void*`` can be cast to
933+
:c:type:`Py_uintptr_t` and then back to ``void*`` again without loss of
934+
information.
935+
936+
Kept for backwards compatibility; prefer using ``uintptr_t`` directly.
937+
922938

923939
.. _api-exceptions:
924940

Doc/c-api/weakref.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ specific object types which directly implement weak references. The first is a
1010
simple reference object, and the second acts as a proxy for the original object
1111
as much as it can.
1212

13+
.. c:type:: PyWeakReference
14+
15+
The C structure of the objects used to describe weak references objects.
1316

1417
.. c:function:: int PyWeakref_Check(PyObject *ob)
1518

Doc/conf.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,22 @@
234234
('py:attr', '__wrapped__'),
235235
]
236236

237+
# Objects present in the stable_abi.dat but removed from the docs
238+
# or with suppressed references to them.
239+
nitpick_ignore += [
240+
# pending removal in Python 3.16
241+
('c:data', 'Py_FileSystemDefaultEncodeErrors'),
242+
('c:data', 'Py_FileSystemDefaultEncoding'),
243+
('c:data', 'Py_HasFileSystemDefaultEncoding'),
244+
('c:data', 'Py_UTF8Mode'),
245+
# legacy typedefs for sq_slice and sq_ass_slice
246+
('c:type', 'ssizessizeargfunc'),
247+
('c:type', 'ssizessizeobjargproc'),
248+
# 'symtable' was exposed by symtable.h but removed in 3.10.
249+
# See https://github.com/python/cpython/pull/24910.
250+
('c:type', 'symtable'),
251+
]
252+
237253
# gh-106948: Copy standard C types declared in the "c:type" domain and C
238254
# structures declared in the "c:struct" domain to the "c:identifier" domain,
239255
# since "c:function" markup looks for types in the "c:identifier" domain. Use

0 commit comments

Comments
 (0)