Skip to content

Commit 3c36c69

Browse files
committed
Merge remote-tracking branch 'origin/master' into bpo_40137_functools2
2 parents e9a51a5 + c0afb7f commit 3c36c69

File tree

468 files changed

+18882
-12589
lines changed

Some content is hidden

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

468 files changed

+18882
-12589
lines changed

.azure-pipelines/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
matrix:
105105
win32:
106106
arch: win32
107-
buildOpt:
107+
buildOpt: '-p Win32'
108108
testRunTitle: '$(Build.SourceBranchName)-win32'
109109
testRunPlatform: win32
110110
win64:

.azure-pipelines/docs-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ steps:
1616
displayName: 'Install build dependencies'
1717

1818
- ${{ if ne(parameters.latex, 'true') }}:
19-
- script: make check suspicious html PYTHON=python
19+
- script: make check html PYTHON=python
2020
workingDirectory: '$(build.sourcesDirectory)/Doc'
2121
displayName: 'Build documentation'
2222

.azure-pipelines/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
matrix:
105105
win32:
106106
arch: win32
107-
buildOpt:
107+
buildOpt: '-p Win32'
108108
testRunTitle: '$(System.PullRequest.TargetBranch)-win32'
109109
testRunPlatform: win32
110110
win64:

.github/workflows/build.yml

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,37 @@ jobs:
4747
# https://github.com/python/core-workflow/issues/373
4848
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true
4949
fi
50+
51+
check_generated_files:
52+
name: 'Check if generated files are up to date'
53+
runs-on: ubuntu-latest
54+
needs: check_source
55+
if: needs.check_source.outputs.run_tests == 'true'
56+
steps:
57+
- uses: actions/checkout@v2
58+
- uses: actions/setup-python@v2
59+
- name: Install Dependencies
60+
run: sudo ./.github/workflows/posix-deps-apt.sh
61+
- name: Build CPython
62+
run: |
63+
# Build Python with the libpython dynamic library
64+
./configure --with-pydebug --enable-shared
65+
make -j4 regen-all
66+
- name: Check for changes
67+
run: |
68+
changes=$(git status --porcelain)
69+
# Check for changes in regenerated files
70+
if ! test -z "$changes"
71+
then
72+
echo "Generated files not up to date. Perhaps you forgot to run make regen-all ;)"
73+
echo "$changes"
74+
exit 1
75+
fi
76+
- name: Check exported libpython symbols
77+
run: make smelly
78+
- name: Check limited ABI symbols
79+
run: make check-limited-abi
80+
5081
build_win32:
5182
name: 'Windows (x86)'
5283
runs-on: windows-latest
@@ -59,7 +90,7 @@ jobs:
5990
- name: Display build info
6091
run: .\python.bat -m test.pythoninfo
6192
- name: Tests
62-
run: .\PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0
93+
run: .\PCbuild\rt.bat -p Win32 -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0
6394

6495
build_win_amd64:
6596
name: 'Windows (x64)'
@@ -73,7 +104,7 @@ jobs:
73104
- name: Display build info
74105
run: .\python.bat -m test.pythoninfo
75106
- name: Tests
76-
run: .\PCbuild\rt.bat -x64 -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0
107+
run: .\PCbuild\rt.bat -p x64 -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0
77108

78109
build_macos:
79110
name: 'macOS'
@@ -106,7 +137,7 @@ jobs:
106137
run: sudo ./.github/workflows/posix-deps-apt.sh
107138
- name: 'Restore OpenSSL build'
108139
id: cache-openssl
109-
uses: actions/[email protected].2
140+
uses: actions/[email protected].3
110141
with:
111142
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
112143
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
run: sudo ./.github/workflows/posix-deps-apt.sh
3333
- name: 'Restore OpenSSL build'
3434
id: cache-openssl
35-
uses: actions/[email protected].2
35+
uses: actions/[email protected].3
3636
with:
3737
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
3838
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}

.github/workflows/doc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ jobs:
3636
- name: 'Install build dependencies'
3737
run: make -C Doc/ PYTHON=../python venv
3838
- name: 'Build documentation'
39-
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going -j4" doctest suspicious html
39+
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going -j4" doctest html
4040
- name: 'Upload'
41-
uses: actions/[email protected].0
41+
uses: actions/[email protected].1
4242
with:
4343
name: doc-html
4444
path: Doc/build/html

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ matrix:
5353
- cd Doc
5454
- make venv PYTHON=python
5555
script:
56-
- make check suspicious html SPHINXOPTS="-q -W -j4"
56+
- make check html SPHINXOPTS="-q -W -j4"
5757
- name: "Documentation tests"
5858
os: linux
5959
language: c
@@ -192,6 +192,8 @@ script:
192192
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./python Tools/scripts/patchcheck.py --travis $TRAVIS_PULL_REQUEST; fi
193193
# Check that all symbols exported by libpython start with "Py" or "_Py"
194194
- make smelly
195+
# Check that all symbols in the limited abi are present
196+
- make check-limited-abi
195197
# `-r -w` implicitly provided through `make buildbottest`.
196198
- |
197199
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then

Doc/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ serve:
216216
# for development releases: always build
217217
autobuild-dev:
218218
make dist SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1'
219-
-make suspicious
220219

221220
# for quick rebuilds (HTML only)
222221
autobuild-dev-html:

Doc/c-api/structures.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ the definition of all other Python objects.
6868
6969
Return a :term:`borrowed reference`.
7070
71-
.. versionchanged:: 3.10
72-
:c:func:`Py_TYPE()` is changed to the inline static function.
73-
Use :c:func:`Py_SET_TYPE()` to set an object type.
71+
The :c:func:`Py_SET_TYPE` function must be used to set an object type.
7472
7573
7674
.. c:function:: int Py_IS_TYPE(PyObject *o, PyTypeObject *type)
@@ -108,9 +106,7 @@ the definition of all other Python objects.
108106
109107
Get the size of the Python object *o*.
110108
111-
.. versionchanged:: 3.10
112-
:c:func:`Py_SIZE()` is changed to the inline static function.
113-
Use :c:func:`Py_SET_SIZE()` to set an object size.
109+
The :c:func:`Py_SET_SIZE` function must be used to set an object size.
114110
115111
116112
.. c:function:: void Py_SET_SIZE(PyVarObject *o, Py_ssize_t size)

Doc/c-api/tuple.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Tuple Objects
5757
.. c:function:: PyObject* PyTuple_GetItem(PyObject *p, Py_ssize_t pos)
5858
5959
Return the object at position *pos* in the tuple pointed to by *p*. If *pos* is
60-
out of bounds, return ``NULL`` and set an :exc:`IndexError` exception.
60+
negative or out of bounds, return ``NULL`` and set an :exc:`IndexError` exception.
6161
6262
6363
.. c:function:: PyObject* PyTuple_GET_ITEM(PyObject *p, Py_ssize_t pos)

Doc/c-api/type.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@ The following functions and structs are used to create
154154
Creates and returns a heap type object from the *spec*
155155
(:const:`Py_TPFLAGS_HEAPTYPE`).
156156
157-
If *bases* is a tuple, the created heap type contains all types contained
158-
in it as base types.
159-
160-
If *bases* is ``NULL``, the *Py_tp_base* slot is used instead.
157+
The *bases* argument can be used to specify base classes; it can either
158+
be only one class or a tuple of classes.
159+
If *bases* is ``NULL``, the *Py_tp_bases* slot is used instead.
160+
If that also is ``NULL``, the *Py_tp_base* slot is used instead.
161161
If that also is ``NULL``, the new type derives from :class:`object`.
162162
163163
The *module* argument can be used to record the module in which the new
@@ -173,7 +173,8 @@ The following functions and structs are used to create
173173
174174
.. versionchanged:: 3.10
175175
176-
The function now accepts NULL ``tp_doc`` slot.
176+
The function now accepts a single class as the *bases* argument and
177+
``NULL`` as the ``tp_doc`` slot.
177178
178179
.. c:function:: PyObject* PyType_FromSpecWithBases(PyType_Spec *spec, PyObject *bases)
179180
@@ -253,7 +254,8 @@ The following functions and structs are used to create
253254
* :c:member:`~PyBufferProcs.bf_getbuffer`
254255
* :c:member:`~PyBufferProcs.bf_releasebuffer`
255256
256-
Setting :c:data:`Py_tp_bases` may be problematic on some platforms.
257+
Setting :c:data:`Py_tp_bases` or :c:data:`Py_tp_base` may be
258+
problematic on some platforms.
257259
To avoid issues, use the *bases* argument of
258260
:py:func:`PyType_FromSpecWithBases` instead.
259261

Doc/c-api/typeobj.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,6 +1170,14 @@ and :c:type:`PyType_Type` effectively act as defaults.)
11701170
.. versionadded:: 3.9
11711171

11721172

1173+
.. data:: Py_TPFLAGS_HAVE_AM_SEND
1174+
1175+
This bit is set when the :c:member:`~PyAsyncMethods.am_send` entry is present in the
1176+
:c:member:`~PyTypeObject.tp_as_async` slot of type structure.
1177+
1178+
.. versionadded:: 3.10
1179+
1180+
11731181
.. c:member:: const char* PyTypeObject.tp_doc
11741182
11751183
An optional pointer to a NUL-terminated C string giving the docstring for this

0 commit comments

Comments
 (0)