Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-39334: FIX: Deprecated sphinx index notations. #18004

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/c-api/bytearray.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Byte Array Objects
------------------

.. index:: object: bytearray
.. index:: pair: object; bytearray


.. c:type:: PyByteArrayObject
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/bytes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Bytes Objects
These functions raise :exc:`TypeError` when expecting a bytes parameter and are
called with a non-bytes parameter.

.. index:: object: bytes
.. index:: pair: object; bytes


.. c:type:: PyBytesObject
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/capsule.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Capsules
--------

.. index:: object: Capsule
.. index:: pair: object; Capsule

Refer to :ref:`using-capsules` for more information on using these objects.

Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/complex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Complex Number Objects
----------------------

.. index:: object: complex number
.. index:: pair: object; complex number

Python's complex number objects are implemented as two distinct types when
viewed from the C API: one is the Python object exposed to Python programs, and
Expand Down
6 changes: 3 additions & 3 deletions Doc/c-api/concrete.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ This section describes Python type objects and the singleton object ``None``.
Numeric Objects
===============

.. index:: object: numeric
.. index:: pair: object; numeric

.. toctree::

Expand All @@ -55,7 +55,7 @@ Numeric Objects
Sequence Objects
================

.. index:: object: sequence
.. index:: pair: object; sequence

Generic operations on sequence objects were discussed in the previous chapter;
this section deals with the specific kinds of sequence objects that are
Expand All @@ -77,7 +77,7 @@ intrinsic to the Python language.
Container Objects
=================

.. index:: object: mapping
.. index:: pair: object; mapping

.. toctree::

Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/dict.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Dictionary Objects
------------------

.. index:: object: dictionary
.. index:: pair: object; dictionary


.. c:type:: PyDictObject
Expand Down Expand Up @@ -147,7 +147,7 @@ Dictionary Objects

.. c:function:: Py_ssize_t PyDict_Size(PyObject *p)

.. index:: builtin: len
.. index:: pair: builtin; len

Return the number of items in the dictionary. This is equivalent to
``len(p)`` on a dictionary.
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ Signal Handling
.. c:function:: int PyErr_CheckSignals()

.. index::
module: signal
pair: module; signal
single: SIGINT
single: KeyboardInterrupt (built-in exception)

Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
File Objects
------------

.. index:: object: file
.. index:: pair: object; file

These APIs are a minimal emulation of the Python 2 C API for built-in file
objects, which used to rely on the buffered I/O (:c:type:`FILE\*`) support
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/float.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Floating Point Objects
----------------------

.. index:: object: floating point
.. index:: pair: object; floating point


.. c:type:: PyFloatObject
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/function.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Function Objects
----------------

.. index:: object: function
.. index:: pair: object; function

There are a few functions specific to Python functions.

Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/import.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Importing Modules

.. c:function:: PyObject* PyImport_ImportModuleEx(const char *name, PyObject *globals, PyObject *locals, PyObject *fromlist)

.. index:: builtin: __import__
.. index:: pair: builtin; __import__

Import a module. This is best described by referring to the built-in Python
function :func:`__import__`.
Expand Down Expand Up @@ -120,7 +120,7 @@ Importing Modules

.. c:function:: PyObject* PyImport_ExecCodeModule(const char *name, PyObject *co)

.. index:: builtin: compile
.. index:: pair: builtin; compile

Given a module name (possibly of the form ``package.module``) and a code object
read from a Python bytecode file or obtained from the built-in function
Expand Down
14 changes: 7 additions & 7 deletions Doc/c-api/init.rst
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ Initializing and finalizing the interpreter
single: PyEval_InitThreads()
single: modules (in module sys)
single: path (in module sys)
module: builtins
module: __main__
module: sys
pair: module; builtins
pair: module; __main__
pair: module; sys
triple: module; search; path
single: PySys_SetArgv()
single: PySys_SetArgvEx()
Expand Down Expand Up @@ -856,7 +856,7 @@ code, or when embedding the Python interpreter:
.. versionchanged:: 3.2
This function cannot be called before :c:func:`Py_Initialize()` anymore.

.. index:: module: _thread
.. index:: pair: module; _thread


.. c:function:: int PyEval_ThreadsInitialized()
Expand Down Expand Up @@ -1198,9 +1198,9 @@ function. You can create and destroy them using the following functions:
.. c:function:: PyThreadState* Py_NewInterpreter()

.. index::
module: builtins
module: __main__
module: sys
pair: module; builtins
pair: module; __main__
pair: module; sys
single: stdout (in module sys)
single: stderr (in module sys)
single: stdin (in module sys)
Expand Down
8 changes: 4 additions & 4 deletions Doc/c-api/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ complete listing.
Objects, Types and Reference Counts
===================================

.. index:: object: type
.. index:: pair: object; type

Most Python/C API functions have one or more arguments as well as a return value
of type :c:type:`PyObject\*`. This type is a pointer to an opaque data type
Expand Down Expand Up @@ -617,9 +617,9 @@ interpreter can only be used after the interpreter has been initialized.

.. index::
single: Py_Initialize()
module: builtins
module: __main__
module: sys
pair: module; builtins
pair: module; __main__
pair: module; sys
triple: module; search; path
single: path (in module sys)

Expand Down
6 changes: 3 additions & 3 deletions Doc/c-api/list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
List Objects
------------

.. index:: object: list
.. index:: pair: object; list


.. c:type:: PyListObject
Expand Down Expand Up @@ -45,7 +45,7 @@ List Objects

.. c:function:: Py_ssize_t PyList_Size(PyObject *list)

.. index:: builtin: len
.. index:: pair: builtin; len

Return the length of the list object in *list*; this is equivalent to
``len(list)`` on a list object.
Expand Down Expand Up @@ -138,7 +138,7 @@ List Objects

.. c:function:: PyObject* PyList_AsTuple(PyObject *list)

.. index:: builtin: tuple
.. index:: pair: builtin; tuple

Return a new tuple object containing the contents of *list*; equivalent to
``tuple(list)``.
Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/long.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
Integer Objects
---------------

.. index:: object: long integer
object: integer
.. index:: pair: object; long integer
pair: object; integer

All integers are implemented as "long" integer objects of arbitrary size.

Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/mapping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and
.. c:function:: Py_ssize_t PyMapping_Size(PyObject *o)
Py_ssize_t PyMapping_Length(PyObject *o)

.. index:: builtin: len
.. index:: pair: builtin; len

Returns the number of keys in object *o* on success, and ``-1`` on failure.
This is equivalent to the Python expression ``len(o)``.
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/memoryview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.. _memoryview-objects:

.. index::
object: memoryview
pair: object; memoryview

MemoryView objects
------------------
Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/method.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Instance Method Objects
-----------------------

.. index:: object: instancemethod
.. index:: pair: object; instancemethod

An instance method is a wrapper for a :c:data:`PyCFunction` and the new way
to bind a :c:data:`PyCFunction` to a class object. It replaces the former call
Expand Down Expand Up @@ -46,7 +46,7 @@ to bind a :c:data:`PyCFunction` to a class object. It replaces the former call
Method Objects
--------------

.. index:: object: method
.. index:: pair: object; method

Methods are bound function objects. Methods are always bound to an instance of
a user-defined class. Unbound methods (methods bound to a class object) are
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Module Objects
--------------

.. index:: object: module
.. index:: pair: object; module


.. c:var:: PyTypeObject PyModule_Type
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/none.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The ``None`` Object
-------------------

.. index:: object: None
.. index:: pair: object; None

Note that the :c:type:`PyTypeObject` for ``None`` is not directly exposed in the
Python/C API. Since ``None`` is a singleton, testing for object identity (using
Expand Down
12 changes: 6 additions & 6 deletions Doc/c-api/number.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ Number Protocol

.. c:function:: PyObject* PyNumber_Divmod(PyObject *o1, PyObject *o2)

.. index:: builtin: divmod
.. index:: pair: builtin; divmod

See the built-in function :func:`divmod`. Returns ``NULL`` on failure. This is
the equivalent of the Python expression ``divmod(o1, o2)``.


.. c:function:: PyObject* PyNumber_Power(PyObject *o1, PyObject *o2, PyObject *o3)

.. index:: builtin: pow
.. index:: pair: builtin; pow

See the built-in function :func:`pow`. Returns ``NULL`` on failure. This is the
equivalent of the Python expression ``pow(o1, o2, o3)``, where *o3* is optional.
Expand All @@ -94,7 +94,7 @@ Number Protocol

.. c:function:: PyObject* PyNumber_Absolute(PyObject *o)

.. index:: builtin: abs
.. index:: pair: builtin; abs

Returns the absolute value of *o*, or ``NULL`` on failure. This is the equivalent
of the Python expression ``abs(o)``.
Expand Down Expand Up @@ -191,7 +191,7 @@ Number Protocol

.. c:function:: PyObject* PyNumber_InPlacePower(PyObject *o1, PyObject *o2, PyObject *o3)

.. index:: builtin: pow
.. index:: pair: builtin; pow

See the built-in function :func:`pow`. Returns ``NULL`` on failure. The operation
is done *in-place* when *o1* supports it. This is the equivalent of the Python
Expand Down Expand Up @@ -237,15 +237,15 @@ Number Protocol

.. c:function:: PyObject* PyNumber_Long(PyObject *o)

.. index:: builtin: int
.. index:: pair: builtin; int

Returns the *o* converted to an integer object on success, or ``NULL`` on
failure. This is the equivalent of the Python expression ``int(o)``.


.. c:function:: PyObject* PyNumber_Float(PyObject *o)

.. index:: builtin: float
.. index:: pair: builtin; float

Returns the *o* converted to a float object on success, or ``NULL`` on failure.
This is the equivalent of the Python expression ``float(o)``.
Expand Down
12 changes: 6 additions & 6 deletions Doc/c-api/object.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Object Protocol

.. c:function:: PyObject* PyObject_Repr(PyObject *o)

.. index:: builtin: repr
.. index:: pair: builtin; repr

Compute a string representation of object *o*. Returns the string
representation on success, ``NULL`` on failure. This is the equivalent of the
Expand All @@ -174,7 +174,7 @@ Object Protocol

.. c:function:: PyObject* PyObject_ASCII(PyObject *o)

.. index:: builtin: ascii
.. index:: pair: builtin; ascii

As :c:func:`PyObject_Repr`, compute a string representation of object *o*, but
escape the non-ASCII characters in the string returned by
Expand All @@ -199,7 +199,7 @@ Object Protocol

.. c:function:: PyObject* PyObject_Bytes(PyObject *o)

.. index:: builtin: bytes
.. index:: pair: builtin; bytes

Compute a bytes representation of object *o*. ``NULL`` is returned on
failure and a bytes object on success. This is equivalent to the Python
Expand Down Expand Up @@ -250,7 +250,7 @@ Object Protocol

.. c:function:: Py_hash_t PyObject_Hash(PyObject *o)

.. index:: builtin: hash
.. index:: pair: builtin; hash

Compute and return the hash value of an object *o*. On failure, return ``-1``.
This is the equivalent of the Python expression ``hash(o)``.
Expand Down Expand Up @@ -284,7 +284,7 @@ Object Protocol

.. c:function:: PyObject* PyObject_Type(PyObject *o)

.. index:: builtin: type
.. index:: pair: builtin; type

When *o* is non-``NULL``, returns a type object corresponding to the object type
of object *o*. On failure, raises :exc:`SystemError` and returns ``NULL``. This
Expand All @@ -304,7 +304,7 @@ Object Protocol
.. c:function:: Py_ssize_t PyObject_Size(PyObject *o)
Py_ssize_t PyObject_Length(PyObject *o)

.. index:: builtin: len
.. index:: pair: builtin; len

Return the length of object *o*. If the object *o* provides either the sequence
and mapping protocols, the sequence length is returned. On error, ``-1`` is
Expand Down
Loading