Skip to content

Commit c55da00

Browse files
authored
Merge branch 'main' into timeout-error-fix
2 parents 8edda13 + 9ed7bf2 commit c55da00

File tree

240 files changed

+5241
-2446
lines changed

Some content is hidden

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

240 files changed

+5241
-2446
lines changed

.github/CODEOWNERS

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,14 @@ Doc/library/site.rst @FFY00
9696
Lib/test/test_except*.py @iritkatriel
9797
Objects/exceptions.c @iritkatriel
9898

99-
# Hashing
100-
**/*hashlib* @gpshead @tiran
99+
# Hashing & cryptographic primitives
100+
**/*hashlib* @gpshead @tiran @picnixz
101101
**/*pyhash* @gpshead @tiran
102-
**/sha* @gpshead @tiran
103-
Modules/md5* @gpshead @tiran
104-
**/*blake* @gpshead @tiran
102+
**/sha* @gpshead @tiran @picnixz
103+
Modules/md5* @gpshead @tiran @picnixz
104+
**/*blake* @gpshead @tiran @picnixz
105105
Modules/_hacl/** @gpshead
106+
**/*hmac* @gpshead @picnixz
106107

107108
# logging
108109
**/*logging* @vsajip

.github/workflows/build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,14 @@ jobs:
231231
name: >-
232232
Ubuntu
233233
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
234+
${{ fromJSON(matrix.bolt) && '(bolt)' || '' }}
234235
needs: check_source
235236
if: needs.check_source.outputs.run_tests == 'true'
236237
strategy:
237238
matrix:
239+
bolt:
240+
- false
241+
- true
238242
free-threading:
239243
- false
240244
- true
@@ -246,9 +250,16 @@ jobs:
246250
exclude:
247251
- os: ubuntu-24.04-aarch64
248252
is-fork: true
253+
# Do not test BOLT with free-threading, to conserve resources
254+
- bolt: true
255+
free-threading: true
256+
# BOLT currently crashes during instrumentation on aarch64
257+
- os: ubuntu-24.04-aarch64
258+
bolt: true
249259
uses: ./.github/workflows/reusable-ubuntu.yml
250260
with:
251261
config_hash: ${{ needs.check_source.outputs.config_hash }}
262+
bolt-optimizations: ${{ matrix.bolt }}
252263
free-threading: ${{ matrix.free-threading }}
253264
os: ${{ matrix.os }}
254265

.github/workflows/reusable-change-detection.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,22 @@ jobs:
8383
# into the PR branch anyway.
8484
#
8585
# https://github.com/python/core-workflow/issues/373
86-
git diff --name-only "origin/$GITHUB_BASE_REF.." | grep -qvE '(\.rst$|^Doc|^Misc|^\.pre-commit-config\.yaml$|\.ruff\.toml$|\.md$|mypy\.ini$)' && echo "run-tests=true" >> "$GITHUB_OUTPUT" || true
86+
grep_ignore_args=(
87+
# file extensions
88+
-e '\.md$'
89+
-e '\.rst$'
90+
# top-level folders
91+
-e '^Doc/'
92+
-e '^Misc/'
93+
# configuration files
94+
-e '^\.github/CODEOWNERS$'
95+
-e '^\.pre-commit-config\.yaml$'
96+
-e '\.ruff\.toml$'
97+
-e 'mypy\.ini$'
98+
)
99+
git diff --name-only "origin/$GITHUB_BASE_REF.." \
100+
| grep -qvE "${grep_ignore_args[@]}" \
101+
&& echo "run-tests=true" >> "$GITHUB_OUTPUT" || true
87102
fi
88103
89104
# Check if we should run hypothesis tests

.github/workflows/reusable-ubuntu.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
config_hash:
77
required: true
88
type: string
9+
bolt-optimizations:
10+
description: Whether to enable BOLT optimizations
11+
required: false
12+
type: boolean
13+
default: false
914
free-threading:
1015
description: Whether to use free-threaded mode
1116
required: false
@@ -34,6 +39,12 @@ jobs:
3439
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
3540
- name: Install dependencies
3641
run: sudo ./.github/workflows/posix-deps-apt.sh
42+
- name: Install Clang and BOLT
43+
if: ${{ fromJSON(inputs.bolt-optimizations) }}
44+
run: |
45+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh 19
46+
sudo apt-get install bolt-19
47+
echo PATH="$(llvm-config-19 --bindir):$PATH" >> $GITHUB_ENV
3748
- name: Configure OpenSSL env vars
3849
run: |
3950
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV"
@@ -73,14 +84,18 @@ jobs:
7384
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
7485
- name: Configure CPython out-of-tree
7586
working-directory: ${{ env.CPYTHON_BUILDDIR }}
87+
# `test_unpickle_module_race` writes to the source directory, which is
88+
# read-only during builds — so we exclude it from profiling with BOLT.
7689
run: >-
90+
PROFILE_TASK='-m test --pgo --ignore test_unpickle_module_race'
7791
../cpython-ro-srcdir/configure
7892
--config-cache
7993
--with-pydebug
8094
--enable-slower-safety
8195
--enable-safety
8296
--with-openssl="$OPENSSL_DIR"
8397
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
98+
${{ fromJSON(inputs.bolt-optimizations) && '--enable-bolt' || '' }}
8499
- name: Build CPython out-of-tree
85100
if: ${{ inputs.free-threading }}
86101
working-directory: ${{ env.CPYTHON_BUILDDIR }}

Doc/c-api/sys.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ Operating System Utilities
234234
235235
The caller must hold the GIL.
236236
237-
.. versionadded:: next
237+
.. versionadded:: 3.14
238238
239239
240240
.. c:function:: int Py_fclose(FILE *file)
@@ -246,7 +246,7 @@ Operating System Utilities
246246
In either case, any further access (including another call to
247247
:c:func:`Py_fclose`) to the stream results in undefined behavior.
248248
249-
.. versionadded:: next
249+
.. versionadded:: 3.14
250250
251251
252252
.. _systemfunctions:

Doc/deprecations/pending-removal-in-3.16.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ Pending removal in Python 3.16
5757
In the rare case that you need the bitwise inversion of
5858
the underlying integer, convert to ``int`` explicitly (``~int(x)``).
5959

60+
* :mod:`functools`:
61+
62+
* Calling the Python implementation of :func:`functools.reduce` with *function*
63+
or *sequence* as keyword arguments has been deprecated since Python 3.14.
64+
6065
* :mod:`shutil`:
6166

6267
* The :class:`!ExecError` exception
@@ -79,8 +84,3 @@ Pending removal in Python 3.16
7984

8085
* The undocumented and unused :attr:`!TarFile.tarfile` attribute
8186
has been deprecated since Python 3.13.
82-
83-
* :mod:`functools`:
84-
85-
* Calling the Python implementation of :func:`functools.reduce` with *function*
86-
or *sequence* as keyword arguments has been deprecated since Python 3.14.

Doc/glossary.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Glossary
115115
:keyword:`yield` expression.
116116

117117
Each :keyword:`yield` temporarily suspends processing, remembering the
118-
location execution state (including local variables and pending
118+
execution state (including local variables and pending
119119
try-statements). When the *asynchronous generator iterator* effectively
120120
resumes with another awaitable returned by :meth:`~object.__anext__`, it
121121
picks up where it left off. See :pep:`492` and :pep:`525`.
@@ -564,7 +564,7 @@ Glossary
564564
An object created by a :term:`generator` function.
565565

566566
Each :keyword:`yield` temporarily suspends processing, remembering the
567-
location execution state (including local variables and pending
567+
execution state (including local variables and pending
568568
try-statements). When the *generator iterator* resumes, it picks up where
569569
it left off (in contrast to functions which start fresh on every
570570
invocation).

Doc/library/asyncio-eventloop.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ an event loop:
7373

7474
Set *loop* as the current event loop for the current OS thread.
7575

76-
.. deprecated:: next
76+
.. deprecated:: 3.14
7777
The :func:`set_event_loop` function is deprecated and will be removed
7878
in Python 3.16.
7979

Doc/library/asyncio-policy.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ for the current process:
4848

4949
Return the current process-wide policy.
5050

51-
.. deprecated:: next
51+
.. deprecated:: 3.14
5252
The :func:`get_event_loop_policy` function is deprecated and
5353
will be removed in Python 3.16.
5454

@@ -58,7 +58,7 @@ for the current process:
5858

5959
If *policy* is set to ``None``, the default policy is restored.
6060

61-
.. deprecated:: next
61+
.. deprecated:: 3.14
6262
The :func:`set_event_loop_policy` function is deprecated and
6363
will be removed in Python 3.16.
6464

@@ -95,7 +95,7 @@ The abstract event loop policy base class is defined as follows:
9595

9696
This method should never return ``None``.
9797

98-
.. deprecated:: next
98+
.. deprecated:: 3.14
9999
The :class:`AbstractEventLoopPolicy` class is deprecated and
100100
will be removed in Python 3.16.
101101

@@ -121,7 +121,7 @@ asyncio ships with the following built-in policies:
121121
The :meth:`get_event_loop` method of the default asyncio policy now
122122
raises a :exc:`RuntimeError` if there is no set event loop.
123123

124-
.. deprecated:: next
124+
.. deprecated:: 3.14
125125
The :class:`DefaultEventLoopPolicy` class is deprecated and
126126
will be removed in Python 3.16.
127127

@@ -133,7 +133,7 @@ asyncio ships with the following built-in policies:
133133

134134
.. availability:: Windows.
135135

136-
.. deprecated:: next
136+
.. deprecated:: 3.14
137137
The :class:`WindowsSelectorEventLoopPolicy` class is deprecated and
138138
will be removed in Python 3.16.
139139

@@ -145,7 +145,7 @@ asyncio ships with the following built-in policies:
145145

146146
.. availability:: Windows.
147147

148-
.. deprecated:: next
148+
.. deprecated:: 3.14
149149
The :class:`WindowsProactorEventLoopPolicy` class is deprecated and
150150
will be removed in Python 3.16.
151151

Doc/library/calendar.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
173173
on the first weekday as specified in the constructor or set by the
174174
:meth:`setfirstweekday` method.
175175

176-
.. versionchanged:: next
176+
.. versionchanged:: 3.14
177177
If *highlight_day* is given, this date is highlighted in color.
178178
This can be :ref:`controlled using environment variables
179179
<using-on-controlling-color>`.
@@ -201,7 +201,7 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
201201
on the first weekday as specified in the constructor or set by the
202202
:meth:`setfirstweekday` method.
203203

204-
.. versionchanged:: next
204+
.. versionchanged:: 3.14
205205
If *highlight_day* is given, this date is highlighted in color.
206206
This can be :ref:`controlled using environment variables
207207
<using-on-controlling-color>`.
@@ -229,7 +229,7 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
229229
:meth:`setfirstweekday` method. The earliest year for which a calendar
230230
can be generated is platform-dependent.
231231

232-
.. versionchanged:: next
232+
.. versionchanged:: 3.14
233233
If *highlight_day* is given, this date is highlighted in color.
234234
This can be :ref:`controlled using environment variables
235235
<using-on-controlling-color>`.
@@ -727,7 +727,7 @@ The following options are accepted:
727727
The number of months printed per row.
728728
Defaults to 3.
729729

730-
.. versionchanged:: next
730+
.. versionchanged:: 3.14
731731
By default, today's date is highlighted in color and can be
732732
:ref:`controlled using environment variables <using-on-controlling-color>`.
733733

0 commit comments

Comments
 (0)