Skip to content

Commit 5c9c7a5

Browse files
authored
Merge branch 'main' into 3.15-pprint-defaults
2 parents 086603c + 12a20da commit 5c9c7a5

337 files changed

Lines changed: 14199 additions & 5223 deletions

File tree

Some content is hidden

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

.github/workflows/build.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -278,13 +278,14 @@ jobs:
278278
# unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
279279
# supported by important vendors such as AWS-LC.
280280
- { name: openssl, version: 1.1.1w }
281-
- { name: openssl, version: 3.0.19 }
282-
- { name: openssl, version: 3.3.6 }
283-
- { name: openssl, version: 3.4.4 }
284-
- { name: openssl, version: 3.5.5 }
285-
- { name: openssl, version: 3.6.1 }
281+
- { name: openssl, version: 3.0.20 }
282+
- { name: openssl, version: 3.3.7 }
283+
- { name: openssl, version: 3.4.5 }
284+
- { name: openssl, version: 3.5.6 }
285+
- { name: openssl, version: 3.6.2 }
286+
- { name: openssl, version: 4.0.0 }
286287
## AWS-LC
287-
- { name: aws-lc, version: 1.68.0 }
288+
- { name: aws-lc, version: 1.72.1 }
288289
env:
289290
SSLLIB_VER: ${{ matrix.ssllib.version }}
290291
MULTISSL_DIR: ${{ github.workspace }}/multissl
@@ -398,7 +399,7 @@ jobs:
398399
needs: build-context
399400
if: needs.build-context.outputs.run-ubuntu == 'true'
400401
env:
401-
OPENSSL_VER: 3.5.5
402+
OPENSSL_VER: 3.5.6
402403
PYTHONSTRICTEXTENSIONBUILD: 1
403404
steps:
404405
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -506,7 +507,7 @@ jobs:
506507
matrix:
507508
os: [ubuntu-24.04]
508509
env:
509-
OPENSSL_VER: 3.5.5
510+
OPENSSL_VER: 3.5.6
510511
PYTHONSTRICTEXTENSIONBUILD: 1
511512
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
512513
steps:

.github/workflows/posix-deps-apt.sh

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,16 @@ apt-get -yq --no-install-recommends install \
2626
xvfb \
2727
zlib1g-dev
2828

29-
# Workaround missing libmpdec-dev on ubuntu 24.04:
30-
# https://launchpad.net/~ondrej/+archive/ubuntu/php
31-
# https://deb.sury.org/
32-
sudo add-apt-repository ppa:ondrej/php
33-
apt-get update
34-
apt-get -yq --no-install-recommends install libmpdec-dev
29+
# Workaround missing libmpdec-dev on ubuntu 24.04 by building mpdecimal
30+
# from source. ppa:ondrej/php (launchpad.net) are unreliable
31+
# (https://status.canonical.com) so fetch the tarball directly
32+
# from the upstream host.
33+
# https://www.bytereef.org/mpdecimal/
34+
MPDECIMAL_VERSION=4.0.1
35+
curl -fsSL "https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-${MPDECIMAL_VERSION}.tar.gz" \
36+
| tar -xz -C /tmp
37+
(cd "/tmp/mpdecimal-${MPDECIMAL_VERSION}" \
38+
&& ./configure --prefix=/usr/local \
39+
&& make -j"$(nproc)" \
40+
&& make install)
41+
ldconfig

.github/workflows/reusable-ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
runs-on: ${{ inputs.os }}
3636
timeout-minutes: 60
3737
env:
38-
OPENSSL_VER: 3.5.5
38+
OPENSSL_VER: 3.5.6
3939
PYTHONSTRICTEXTENSIONBUILD: 1
4040
TERM: linux
4141
steps:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ Tools/unicode/data/
140140
/.ccache
141141
/cross-build*/
142142
/jit_stencils*.h
143+
/jit_unwind_info*.h
143144
/platform
144145
/profile-clean-stamp
145146
/profile-run-stamp

Doc/c-api/perfmaps.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Note that holding an :term:`attached thread state` is not required for these API
3131
or ``-2`` on failure to create a lock. Check ``errno`` for more information
3232
about the cause of a failure.
3333

34-
.. c:function:: int PyUnstable_WritePerfMapEntry(const void *code_addr, unsigned int code_size, const char *entry_name)
34+
.. c:function:: int PyUnstable_WritePerfMapEntry(const void *code_addr, size_t code_size, const char *entry_name)
3535
3636
Write one single entry to the ``/tmp/perf-$pid.map`` file. This function is
3737
thread safe. Here is what an example entry looks like::

Doc/c-api/synchronization.rst

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,6 @@ there is no :c:type:`PyObject` -- for example, when working with a C type that
8484
does not extend or wrap :c:type:`PyObject` but still needs to call into the C
8585
API in a manner that might lead to deadlocks.
8686
87-
The functions and structs used by the macros are exposed for cases
88-
where C macros are not available. They should only be used as in the
89-
given macro expansions. Note that the sizes and contents of the structures may
90-
change in future Python versions.
91-
9287
.. note::
9388
9489
Operations that need to lock two objects at once must use
@@ -114,12 +109,15 @@ section API avoids potential deadlocks due to reentrancy and lock ordering
114109
by allowing the runtime to temporarily suspend the critical section if the
115110
code triggered by the finalizer blocks and calls :c:func:`PyEval_SaveThread`.
116111
112+
.. _critical-section-macros:
113+
117114
.. c:macro:: Py_BEGIN_CRITICAL_SECTION(op)
118115
119116
Acquires the per-object lock for the object *op* and begins a
120117
critical section.
121118
122-
In the free-threaded build, this macro expands to::
119+
In the free-threaded build, and when building for the
120+
:ref:`Stable ABI <stable-abi>`, this macro expands to::
123121
124122
{
125123
PyCriticalSection _py_cs;
@@ -150,7 +148,8 @@ code triggered by the finalizer blocks and calls :c:func:`PyEval_SaveThread`.
150148
151149
Ends the critical section and releases the per-object lock.
152150
153-
In the free-threaded build, this macro expands to::
151+
In the free-threaded build, and when building for the
152+
:ref:`Stable ABI <stable-abi>`, this macro expands to::
154153
155154
PyCriticalSection_End(&_py_cs);
156155
}
@@ -179,7 +178,8 @@ code triggered by the finalizer blocks and calls :c:func:`PyEval_SaveThread`.
179178
180179
Locks the mutexes *m1* and *m2* and begins a critical section.
181180
182-
In the free-threaded build, this macro expands to::
181+
In the free-threaded build, and when building for the
182+
:ref:`Stable ABI <stable-abi>`, this macro expands to::
183183
184184
{
185185
PyCriticalSection2 _py_cs2;
@@ -196,7 +196,8 @@ code triggered by the finalizer blocks and calls :c:func:`PyEval_SaveThread`.
196196
197197
Ends the critical section and releases the per-object locks.
198198
199-
In the free-threaded build, this macro expands to::
199+
In the free-threaded build, and when building for the
200+
:ref:`Stable ABI <stable-abi>`, this macro expands to::
200201
201202
PyCriticalSection2_End(&_py_cs2);
202203
}
@@ -205,6 +206,48 @@ code triggered by the finalizer blocks and calls :c:func:`PyEval_SaveThread`.
205206
206207
.. versionadded:: 3.13
207208
209+
Low-level critical section API
210+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
211+
212+
The following functions and structs are exposed for cases where C macros
213+
are not available.
214+
215+
.. c:function:: void PyCriticalSection_Begin(PyCriticalSection *c, PyObject *op)
216+
void PyCriticalSection_End(PyCriticalSection *c)
217+
void PyCriticalSection2_Begin(PyCriticalSection2 *c, PyObject *a, PyObject *b)
218+
void PyCriticalSection2_End(PyCriticalSection2 *c);
219+
220+
To be used only as in the macro expansions
221+
listed :ref:`earlier in this section <critical-section-macros>`.
222+
223+
In non-:term:`free-threaded <free threading>` builds of CPython, these
224+
functions do nothing.
225+
226+
.. versionadded:: 3.13
227+
228+
.. c:type:: PyCriticalSection
229+
PyCriticalSection2
230+
231+
To be used only as in the macro expansions
232+
listed :ref:`earlier in this section <critical-section-macros>`.
233+
Note that the contents of the structures are private and their meaning may
234+
change in future Python versions.
235+
236+
.. versionadded:: 3.13
237+
238+
.. c:function:: void PyCriticalSection_BeginMutex(PyCriticalSection *c, PyMutex *m);
239+
void PyCriticalSection2_BeginMutex(PyCriticalSection2 *c, PyMutex *m1, PyMutex *m2);
240+
241+
.. (These need to be in a separate section without a Stable ABI anotation.)
242+
243+
To be used only as in the macro expansions
244+
listed :ref:`earlier in this section <critical-section-macros>`.
245+
246+
In non-:term:`free-threaded <free threading>` builds of CPython, these
247+
functions do nothing.
248+
249+
.. versionadded:: 3.14
250+
208251
209252
Legacy locking APIs
210253
-------------------

Doc/data/stable_abi.dat

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,9 @@ Pending removal in Python 3.18
1010
specifier ``'N'``, which is only supported in the :mod:`!decimal` module's
1111
C implementation, has been deprecated since Python 3.13.
1212
(Contributed by Serhiy Storchaka in :gh:`89902`.)
13+
14+
* Deprecations defined by :pep:`829`:
15+
16+
* ``import`` lines in :file:`{name}.pth` files are silently ignored.
17+
18+
(Contributed by Barry Warsaw in :gh:`148641`.)

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,12 @@ Pending removal in Python 3.19
2222
supported depending on the backend implementation of hash functions.
2323
Prefer passing the initial data as a positional argument for maximum
2424
backwards compatibility.
25+
26+
* :mod:`http.cookies`:
27+
28+
* :meth:`http.cookies.Morsel.js_output` is deprecated and will be
29+
removed in Python 3.19.
30+
31+
* :meth:`http.cookies.BaseCookie.js_output` is deprecated and will be
32+
removed in Python 3.19.
33+

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,18 @@ Pending removal in Python 3.20
3838
- :mod:`zlib`
3939

4040
(Contributed by Hugo van Kemenade and Stan Ulbrych in :gh:`76007`.)
41+
42+
* Deprecations defined by :pep:`829`:
43+
44+
* Warnings are produced for ``import`` lines found in :file:`{name}.pth`
45+
files.
46+
47+
* :file:`{name}.pth` files are no longer decoded in the locale encoding by
48+
default. They **MUST** be encoded in ``utf-8-sig``.
49+
50+
(Contributed by Barry Warsaw in :gh:`148641`.)
51+
52+
* :mod:`ast`:
53+
54+
* Creating instances of abstract AST nodes (such as :class:`ast.AST`
55+
or :class:`!ast.expr`) is deprecated and will raise an error in Python 3.20.

0 commit comments

Comments
 (0)