Skip to content

Commit 0cd116b

Browse files
authored
Merge branch 'main' into fix/ubsan/exceptions-111178
2 parents 96f2d2d + 4dade05 commit 0cd116b

File tree

237 files changed

+5207
-2426
lines changed

Some content is hidden

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

237 files changed

+5207
-2426
lines changed

.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-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/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

Doc/library/ctypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2233,7 +2233,7 @@ Utility functions
22332233

22342234
.. audit-event:: ctypes.memoryview_at address,size,readonly
22352235

2236-
.. versionadded:: next
2236+
.. versionadded:: 3.14
22372237

22382238

22392239
.. _ctypes-data-types:

Doc/library/faulthandler.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Fault handler state
9191
The dump now mentions if a garbage collector collection is running
9292
if *all_threads* is true.
9393

94-
.. versionchanged:: next
94+
.. versionchanged:: 3.14
9595
Only the current thread is dumped if the :term:`GIL` is disabled to
9696
prevent the risk of data races.
9797

Doc/library/importlib.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,13 +380,15 @@ ABC hierarchy::
380380

381381
.. class:: ResourceLoader
382382

383+
*Superseded by TraversableResources*
384+
383385
An abstract base class for a :term:`loader` which implements the optional
384386
:pep:`302` protocol for loading arbitrary resources from the storage
385387
back-end.
386388

387389
.. deprecated:: 3.7
388390
This ABC is deprecated in favour of supporting resource loading
389-
through :class:`importlib.resources.abc.ResourceReader`.
391+
through :class:`importlib.resources.abc.TraversableResources`.
390392

391393
.. abstractmethod:: get_data(path)
392394

0 commit comments

Comments
 (0)