Skip to content

Commit

Permalink
Merge branch 'main' into pythongh-73435-pathlib-match-recursive
Browse files Browse the repository at this point in the history
  • Loading branch information
barneygale committed May 6, 2023
2 parents 722a1ab + de7f694 commit 0ccf3df
Show file tree
Hide file tree
Showing 386 changed files with 9,872 additions and 5,716 deletions.
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
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 @@ -154,7 +154,7 @@ Dictionary Objects
.. c:function:: Py_ssize_t PyDict_Size(PyObject *p)
.. index:: builtin: len
.. index:: pair: built-in function; len
Return the number of items in the dictionary. This is equivalent to
``len(p)`` on a dictionary.
Expand Down
6 changes: 3 additions & 3 deletions Doc/c-api/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ Signal Handling
.. c:function:: int PyErr_CheckSignals()
.. index::
module: signal
pair: module; signal
single: SIGINT
single: KeyboardInterrupt (built-in exception)
Expand Down Expand Up @@ -633,7 +633,7 @@ Signal Handling
.. c:function:: void PyErr_SetInterrupt()
.. index::
module: signal
pair: module; signal
single: SIGINT
single: KeyboardInterrupt (built-in exception)
Expand All @@ -648,7 +648,7 @@ Signal Handling
.. c:function:: int PyErr_SetInterruptEx(int signum)
.. index::
module: signal
pair: module; signal
single: KeyboardInterrupt (built-in exception)
Simulate the effect of a signal arriving. The next time
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:expr:`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
8 changes: 4 additions & 4 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: built-in function; __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: built-in function; 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 Expand Up @@ -186,10 +186,10 @@ Importing Modules
.. versionadded:: 3.2
.. versionchanged:: 3.3
Uses :func:`imp.source_from_cache()` in calculating the source path if
Uses :func:`!imp.source_from_cache()` in calculating the source path if
only the bytecode path is provided.
.. versionchanged:: 3.12
No longer uses the removed ``imp`` module.
No longer uses the removed :mod:`!imp` module.
.. c:function:: long PyImport_GetMagicNumber()
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 @@ -336,9 +336,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 @@ -1051,7 +1051,7 @@ code, or when embedding the Python interpreter:
.. deprecated:: 3.9
.. index:: module: _thread
.. index:: pair: module; _thread
.. c:function:: int PyEval_ThreadsInitialized()
Expand Down Expand Up @@ -1494,9 +1494,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 @@ -261,7 +261,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:expr:`PyObject*`. This type is a pointer to an opaque data type
Expand Down Expand Up @@ -705,9 +705,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: built-in function; 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: built-in function; tuple
Return a new tuple object containing the contents of *list*; equivalent to
``tuple(list)``.
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: built-in function; 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 @@ -47,7 +47,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: built-in function; 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: built-in function; 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: built-in function; 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 @@ -192,7 +192,7 @@ Number Protocol
.. c:function:: PyObject* PyNumber_InPlacePower(PyObject *o1, PyObject *o2, PyObject *o3)
.. index:: builtin: pow
.. index:: pair: built-in function; 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 @@ -238,15 +238,15 @@ Number Protocol
.. c:function:: PyObject* PyNumber_Long(PyObject *o)
.. index:: builtin: int
.. index:: pair: built-in function; 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: built-in function; 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
Loading

0 comments on commit 0ccf3df

Please sign in to comment.