Skip to content

Commit d3a3396

Browse files
committed
Merge branch 'main' into pythongh-77609-glob-follow-symlinks
2 parents 2db28d9 + a33ce66 commit d3a3396

File tree

434 files changed

+10485
-3522
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

434 files changed

+10485
-3522
lines changed

Diff for: .github/CODEOWNERS

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
# GitHub
88
.github/** @ezio-melotti @hugovk
99

10+
# pre-commit
11+
.pre-commit-config.yaml @hugovk @AlexWaygood
12+
1013
# Build system
1114
configure* @erlend-aasland @corona10
1215

Diff for: .github/workflows/lint.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Lint
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
permissions:
6+
contents: read
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 10
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: actions/setup-python@v4
20+
with:
21+
python-version: "3.x"
22+
- uses: pre-commit/[email protected]

Diff for: .github/workflows/require-pr-label.yml

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
pull_request:
55
types: [opened, reopened, labeled, unlabeled, synchronize]
66

7+
permissions:
8+
issues: read
9+
pull-requests: read
10+
711
jobs:
812
label:
913
name: DO-NOT-MERGE / unresolved review

Diff for: .pre-commit-config.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: check-yaml
6+
- id: trailing-whitespace
7+
types_or: [c, python, rst]

Diff for: Doc/c-api/bytearray.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Byte Array Objects
66
------------------
77

8-
.. index:: object: bytearray
8+
.. index:: pair: object; bytearray
99

1010

1111
.. c:type:: PyByteArrayObject

Diff for: Doc/c-api/bytes.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Bytes Objects
88
These functions raise :exc:`TypeError` when expecting a bytes parameter and
99
called with a non-bytes parameter.
1010

11-
.. index:: object: bytes
11+
.. index:: pair: object; bytes
1212

1313

1414
.. c:type:: PyBytesObject

Diff for: Doc/c-api/capsule.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Capsules
66
--------
77

8-
.. index:: object: Capsule
8+
.. index:: pair: object; Capsule
99

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

Diff for: Doc/c-api/complex.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Complex Number Objects
66
----------------------
77

8-
.. index:: object: complex number
8+
.. index:: pair: object; complex number
99

1010
Python's complex number objects are implemented as two distinct types when
1111
viewed from the C API: one is the Python object exposed to Python programs, and

Diff for: Doc/c-api/concrete.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ This section describes Python type objects and the singleton object ``None``.
4040
Numeric Objects
4141
===============
4242

43-
.. index:: object: numeric
43+
.. index:: pair: object; numeric
4444

4545
.. toctree::
4646

@@ -55,7 +55,7 @@ Numeric Objects
5555
Sequence Objects
5656
================
5757

58-
.. index:: object: sequence
58+
.. index:: pair: object; sequence
5959

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

80-
.. index:: object: mapping
80+
.. index:: pair: object; mapping
8181

8282
.. toctree::
8383

Diff for: Doc/c-api/dict.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Dictionary Objects
66
------------------
77

8-
.. index:: object: dictionary
8+
.. index:: pair: object; dictionary
99

1010

1111
.. c:type:: PyDictObject
@@ -154,7 +154,7 @@ Dictionary Objects
154154
155155
.. c:function:: Py_ssize_t PyDict_Size(PyObject *p)
156156
157-
.. index:: builtin: len
157+
.. index:: pair: built-in function; len
158158
159159
Return the number of items in the dictionary. This is equivalent to
160160
``len(p)`` on a dictionary.

Diff for: Doc/c-api/exceptions.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ Signal Handling
602602
.. c:function:: int PyErr_CheckSignals()
603603
604604
.. index::
605-
module: signal
605+
pair: module; signal
606606
single: SIGINT
607607
single: KeyboardInterrupt (built-in exception)
608608
@@ -633,7 +633,7 @@ Signal Handling
633633
.. c:function:: void PyErr_SetInterrupt()
634634
635635
.. index::
636-
module: signal
636+
pair: module; signal
637637
single: SIGINT
638638
single: KeyboardInterrupt (built-in exception)
639639
@@ -648,7 +648,7 @@ Signal Handling
648648
.. c:function:: int PyErr_SetInterruptEx(int signum)
649649
650650
.. index::
651-
module: signal
651+
pair: module; signal
652652
single: KeyboardInterrupt (built-in exception)
653653
654654
Simulate the effect of a signal arriving. The next time

Diff for: Doc/c-api/file.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
File Objects
66
------------
77

8-
.. index:: object: file
8+
.. index:: pair: object; file
99

1010
These APIs are a minimal emulation of the Python 2 C API for built-in file
1111
objects, which used to rely on the buffered I/O (:c:expr:`FILE*`) support

Diff for: Doc/c-api/float.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Floating Point Objects
66
----------------------
77

8-
.. index:: object: floating point
8+
.. index:: pair: object; floating point
99

1010

1111
.. c:type:: PyFloatObject

Diff for: Doc/c-api/function.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Function Objects
66
----------------
77

8-
.. index:: object: function
8+
.. index:: pair: object; function
99

1010
There are a few functions specific to Python functions.
1111

Diff for: Doc/c-api/import.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Importing Modules
4141
4242
.. c:function:: PyObject* PyImport_ImportModuleEx(const char *name, PyObject *globals, PyObject *locals, PyObject *fromlist)
4343
44-
.. index:: builtin: __import__
44+
.. index:: pair: built-in function; __import__
4545
4646
Import a module. This is best described by referring to the built-in Python
4747
function :func:`__import__`.
@@ -120,7 +120,7 @@ Importing Modules
120120
121121
.. c:function:: PyObject* PyImport_ExecCodeModule(const char *name, PyObject *co)
122122
123-
.. index:: builtin: compile
123+
.. index:: pair: built-in function; compile
124124
125125
Given a module name (possibly of the form ``package.module``) and a code object
126126
read from a Python bytecode file or obtained from the built-in function

Diff for: Doc/c-api/init.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,9 @@ Initializing and finalizing the interpreter
336336
single: PyEval_InitThreads()
337337
single: modules (in module sys)
338338
single: path (in module sys)
339-
module: builtins
340-
module: __main__
341-
module: sys
339+
pair: module; builtins
340+
pair: module; __main__
341+
pair: module; sys
342342
triple: module; search; path
343343
single: PySys_SetArgv()
344344
single: PySys_SetArgvEx()
@@ -1051,7 +1051,7 @@ code, or when embedding the Python interpreter:
10511051
10521052
.. deprecated:: 3.9
10531053
1054-
.. index:: module: _thread
1054+
.. index:: pair: module; _thread
10551055
10561056
10571057
.. c:function:: int PyEval_ThreadsInitialized()
@@ -1494,9 +1494,9 @@ function. You can create and destroy them using the following functions:
14941494
.. c:function:: PyThreadState* Py_NewInterpreter()
14951495
14961496
.. index::
1497-
module: builtins
1498-
module: __main__
1499-
module: sys
1497+
pair: module; builtins
1498+
pair: module; __main__
1499+
pair: module; sys
15001500
single: stdout (in module sys)
15011501
single: stderr (in module sys)
15021502
single: stdin (in module sys)

Diff for: Doc/c-api/intro.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ complete listing.
261261
Objects, Types and Reference Counts
262262
===================================
263263

264-
.. index:: object: type
264+
.. index:: pair: object; type
265265

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

706706
.. index::
707707
single: Py_Initialize()
708-
module: builtins
709-
module: __main__
710-
module: sys
708+
pair: module; builtins
709+
pair: module; __main__
710+
pair: module; sys
711711
triple: module; search; path
712712
single: path (in module sys)
713713

Diff for: Doc/c-api/list.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
List Objects
66
------------
77

8-
.. index:: object: list
8+
.. index:: pair: object; list
99

1010

1111
.. c:type:: PyListObject
@@ -45,7 +45,7 @@ List Objects
4545
4646
.. c:function:: Py_ssize_t PyList_Size(PyObject *list)
4747
48-
.. index:: builtin: len
48+
.. index:: pair: built-in function; len
4949
5050
Return the length of the list object in *list*; this is equivalent to
5151
``len(list)`` on a list object.
@@ -138,7 +138,7 @@ List Objects
138138
139139
.. c:function:: PyObject* PyList_AsTuple(PyObject *list)
140140
141-
.. index:: builtin: tuple
141+
.. index:: pair: built-in function; tuple
142142
143143
Return a new tuple object containing the contents of *list*; equivalent to
144144
``tuple(list)``.

Diff for: Doc/c-api/long.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
Integer Objects
66
---------------
77

8-
.. index:: object: long integer
9-
object: integer
8+
.. index:: pair: object; long integer
9+
pair: object; integer
1010

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

Diff for: Doc/c-api/mapping.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and
2020
.. c:function:: Py_ssize_t PyMapping_Size(PyObject *o)
2121
Py_ssize_t PyMapping_Length(PyObject *o)
2222
23-
.. index:: builtin: len
23+
.. index:: pair: built-in function; len
2424
2525
Returns the number of keys in object *o* on success, and ``-1`` on failure.
2626
This is equivalent to the Python expression ``len(o)``.

Diff for: Doc/c-api/memoryview.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.. _memoryview-objects:
44

55
.. index::
6-
object: memoryview
6+
pair: object; memoryview
77

88
MemoryView objects
99
------------------

Diff for: Doc/c-api/method.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Instance Method Objects
66
-----------------------
77

8-
.. index:: object: instancemethod
8+
.. index:: pair: object; instancemethod
99

1010
An instance method is a wrapper for a :c:data:`PyCFunction` and the new way
1111
to bind a :c:data:`PyCFunction` to a class object. It replaces the former call
@@ -47,7 +47,7 @@ to bind a :c:data:`PyCFunction` to a class object. It replaces the former call
4747
Method Objects
4848
--------------
4949
50-
.. index:: object: method
50+
.. index:: pair: object; method
5151
5252
Methods are bound function objects. Methods are always bound to an instance of
5353
a user-defined class. Unbound methods (methods bound to a class object) are

Diff for: Doc/c-api/module.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Module Objects
66
--------------
77

8-
.. index:: object: module
8+
.. index:: pair: object; module
99

1010

1111
.. c:var:: PyTypeObject PyModule_Type

Diff for: Doc/c-api/none.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
The ``None`` Object
66
-------------------
77

8-
.. index:: object: None
8+
.. index:: pair: object; None
99

1010
Note that the :c:type:`PyTypeObject` for ``None`` is not directly exposed in the
1111
Python/C API. Since ``None`` is a singleton, testing for object identity (using

0 commit comments

Comments
 (0)