Skip to content

Commit 16200ae

Browse files
authored
Merge branch 'main' into fix/uuid/mac-address-libuuid-132710
2 parents ee71d62 + 670b6cc commit 16200ae

File tree

250 files changed

+18988
-3964
lines changed

Some content is hidden

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

250 files changed

+18988
-3964
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Modules/Setup* @erlend-aasland
3030
Objects/set* @rhettinger
3131
Objects/dict* @methane @markshannon
3232
Objects/typevarobject.c @JelleZijlstra
33+
Objects/unionobject.c @JelleZijlstra
3334
Objects/type* @markshannon
3435
Objects/codeobject.c @markshannon
3536
Objects/frameobject.c @markshannon

.github/workflows/build.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ jobs:
264264
fail-fast: false
265265
matrix:
266266
os: [ubuntu-24.04]
267-
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2, 3.4.0]
267+
openssl_ver: [3.0.16, 3.1.8, 3.2.4, 3.3.3, 3.4.1]
268268
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
269269
env:
270270
OPENSSL_VER: ${{ matrix.openssl_ver }}
@@ -331,7 +331,7 @@ jobs:
331331
needs: build-context
332332
if: needs.build-context.outputs.run-tests == 'true'
333333
env:
334-
OPENSSL_VER: 3.0.15
334+
OPENSSL_VER: 3.0.16
335335
PYTHONSTRICTEXTENSIONBUILD: 1
336336
steps:
337337
- uses: actions/checkout@v4
@@ -422,8 +422,9 @@ jobs:
422422
# failing when executed from inside a virtual environment.
423423
"${VENV_PYTHON}" -m test \
424424
-W \
425-
-o \
425+
--slowest \
426426
-j4 \
427+
--timeout 900 \
427428
-x test_asyncio \
428429
-x test_multiprocessing_fork \
429430
-x test_multiprocessing_forkserver \
@@ -450,7 +451,7 @@ jobs:
450451
matrix:
451452
os: [ubuntu-24.04]
452453
env:
453-
OPENSSL_VER: 3.0.15
454+
OPENSSL_VER: 3.0.16
454455
PYTHONSTRICTEXTENSIONBUILD: 1
455456
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
456457
steps:

.github/zizmor.yml

+4
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ rules:
44
dangerous-triggers:
55
ignore:
66
- documentation-links.yml
7+
unpinned-uses:
8+
config:
9+
policies:
10+
"*": ref-pin

.pre-commit-config.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.11.4
3+
rev: v0.11.6
44
hooks:
55
- id: ruff
66
name: Run Ruff (lint) on Doc/
@@ -24,7 +24,7 @@ repos:
2424
files: ^Doc/
2525

2626
- repo: https://github.com/psf/black-pre-commit-mirror
27-
rev: 24.10.0
27+
rev: 25.1.0
2828
hooks:
2929
- id: black
3030
name: Run Black on Tools/build/check_warnings.py
@@ -49,7 +49,7 @@ repos:
4949
types_or: [c, inc, python, rst]
5050

5151
- repo: https://github.com/python-jsonschema/check-jsonschema
52-
rev: 0.31.0
52+
rev: 0.33.0
5353
hooks:
5454
- id: check-dependabot
5555
- id: check-github-workflows
@@ -61,7 +61,7 @@ repos:
6161
- id: actionlint
6262

6363
- repo: https://github.com/woodruffw/zizmor-pre-commit
64-
rev: v1.1.1
64+
rev: v1.6.0
6565
hooks:
6666
- id: zizmor
6767

Doc/c-api/arg.rst

+2
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,8 @@ Building values
669669
``L`` (:class:`int`) [long long]
670670
Convert a C :c:expr:`long long` to a Python integer object.
671671
672+
.. _capi-py-buildvalue-format-K:
673+
672674
``K`` (:class:`int`) [unsigned long long]
673675
Convert a C :c:expr:`unsigned long long` to a Python integer object.
674676

Doc/c-api/complex.rst

-54
Original file line numberDiff line numberDiff line change
@@ -44,36 +44,12 @@ pointers. This is consistent throughout the API.
4444
representation.
4545
4646
47-
.. c:function:: Py_complex _Py_cr_sum(Py_complex left, double right)
48-
49-
Return the sum of a complex number and a real number, using the C :c:type:`Py_complex`
50-
representation.
51-
52-
.. versionadded:: 3.14
53-
54-
5547
.. c:function:: Py_complex _Py_c_diff(Py_complex left, Py_complex right)
5648
5749
Return the difference between two complex numbers, using the C
5850
:c:type:`Py_complex` representation.
5951
6052
61-
.. c:function:: Py_complex _Py_cr_diff(Py_complex left, double right)
62-
63-
Return the difference between a complex number and a real number, using the C
64-
:c:type:`Py_complex` representation.
65-
66-
.. versionadded:: 3.14
67-
68-
69-
.. c:function:: Py_complex _Py_rc_diff(double left, Py_complex right)
70-
71-
Return the difference between a real number and a complex number, using the C
72-
:c:type:`Py_complex` representation.
73-
74-
.. versionadded:: 3.14
75-
76-
7753
.. c:function:: Py_complex _Py_c_neg(Py_complex num)
7854
7955
Return the negation of the complex number *num*, using the C
@@ -86,14 +62,6 @@ pointers. This is consistent throughout the API.
8662
representation.
8763
8864
89-
.. c:function:: Py_complex _Py_cr_prod(Py_complex left, double right)
90-
91-
Return the product of a complex number and a real number, using the C
92-
:c:type:`Py_complex` representation.
93-
94-
.. versionadded:: 3.14
95-
96-
9765
.. c:function:: Py_complex _Py_c_quot(Py_complex dividend, Py_complex divisor)
9866
9967
Return the quotient of two complex numbers, using the C :c:type:`Py_complex`
@@ -103,28 +71,6 @@ pointers. This is consistent throughout the API.
10371
:c:data:`errno` to :c:macro:`!EDOM`.
10472
10573
106-
.. c:function:: Py_complex _Py_cr_quot(Py_complex dividend, double divisor)
107-
108-
Return the quotient of a complex number and a real number, using the C
109-
:c:type:`Py_complex` representation.
110-
111-
If *divisor* is zero, this method returns zero and sets
112-
:c:data:`errno` to :c:macro:`!EDOM`.
113-
114-
.. versionadded:: 3.14
115-
116-
117-
.. c:function:: Py_complex _Py_rc_quot(double dividend, Py_complex divisor)
118-
119-
Return the quotient of a real number and a complex number, using the C
120-
:c:type:`Py_complex` representation.
121-
122-
If *divisor* is zero, this method returns zero and sets
123-
:c:data:`errno` to :c:macro:`!EDOM`.
124-
125-
.. versionadded:: 3.14
126-
127-
12874
.. c:function:: Py_complex _Py_c_pow(Py_complex num, Py_complex exp)
12975
13076
Return the exponentiation of *num* by *exp*, using the C :c:type:`Py_complex`

Doc/c-api/intro.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ complete listing.
148148
.. c:macro:: Py_ALWAYS_INLINE
149149
150150
Ask the compiler to always inline a static inline function. The compiler can
151-
ignore it and decides to not inline the function.
151+
ignore it and decide to not inline the function.
152152

153153
It can be used to inline performance critical static inline functions when
154154
building Python in debug mode with function inlining disabled. For example,

Doc/c-api/unicode.rst

+26
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,21 @@ APIs:
674674
.. versionadded:: 3.3
675675
676676
677+
.. c:function:: int PyUnicode_Resize(PyObject **unicode, Py_ssize_t length);
678+
679+
Resize a Unicode object *\*unicode* to the new *length* in code points.
680+
681+
Try to resize the string in place (which is usually faster than allocating
682+
a new string and copying characters), or create a new string.
683+
684+
*\*unicode* is modified to point to the new (resized) object and ``0`` is
685+
returned on success. Otherwise, ``-1`` is returned and an exception is set,
686+
and *\*unicode* is left untouched.
687+
688+
The function doesn't check string content, the result may not be a
689+
string in canonical representation.
690+
691+
677692
.. c:function:: Py_ssize_t PyUnicode_Fill(PyObject *unicode, Py_ssize_t start, \
678693
Py_ssize_t length, Py_UCS4 fill_char)
679694
@@ -1011,6 +1026,17 @@ generic ones are documented for simplicity.
10111026
Generic Codecs
10121027
""""""""""""""
10131028
1029+
The following macro is provided:
1030+
1031+
1032+
.. c:macro:: Py_UNICODE_REPLACEMENT_CHARACTER
1033+
1034+
The Unicode code point ``U+FFFD`` (replacement character).
1035+
1036+
This Unicode character is used as the replacement character during
1037+
decoding if the *errors* argument is set to "replace".
1038+
1039+
10141040
These are the generic codec APIs:
10151041
10161042

Doc/data/refcounts.dat

+4
Original file line numberDiff line numberDiff line change
@@ -2794,6 +2794,10 @@ PyUnicode_CopyCharacters:PyObject*:from:0:
27942794
PyUnicode_CopyCharacters:Py_ssize_t:from_start::
27952795
PyUnicode_CopyCharacters:Py_ssize_t:how_many::
27962796

2797+
PyUnicode_Resize:int:::
2798+
PyUnicode_Resize:PyObject**:unicode:0:
2799+
PyUnicode_Resize:Py_ssize_t:length::
2800+
27972801
PyUnicode_Fill:Py_ssize_t:::
27982802
PyUnicode_Fill:PyObject*:unicode:0:
27992803
PyUnicode_Fill:Py_ssize_t:start::

Doc/data/stable_abi.dat

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Doc/deprecations/c-api-pending-removal-in-3.15.rst

+10
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ Pending removal in Python 3.15
1010
:c:func:`PyWeakref_GetRef` on Python 3.12 and older.
1111
* :c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro:
1212
Use :c:type:`wchar_t` instead.
13+
* :c:func:`!PyUnicode_AsDecodedObject`:
14+
Use :c:func:`PyCodec_Decode` instead.
15+
* :c:func:`!PyUnicode_AsDecodedUnicode`:
16+
Use :c:func:`PyCodec_Decode` instead; Note that some codecs (for example, "base64")
17+
may return a type other than :class:`str`, such as :class:`bytes`.
18+
* :c:func:`!PyUnicode_AsEncodedObject`:
19+
Use :c:func:`PyCodec_Encode` instead.
20+
* :c:func:`!PyUnicode_AsEncodedUnicode`:
21+
Use :c:func:`PyCodec_Encode` instead; Note that some codecs (for example, "base64")
22+
may return a type other than :class:`bytes`, such as :class:`str`.
1323
* Python initialization functions, deprecated in Python 3.13:
1424

1525
* :c:func:`Py_GetPath`:

Doc/deprecations/c-api-pending-removal-in-future.rst

-8
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@ although there is currently no date scheduled for their removal.
1818
Use :c:func:`PyOS_AfterFork_Child` instead.
1919
* :c:func:`PySlice_GetIndicesEx`:
2020
Use :c:func:`PySlice_Unpack` and :c:func:`PySlice_AdjustIndices` instead.
21-
* :c:func:`!PyUnicode_AsDecodedObject`:
22-
Use :c:func:`PyCodec_Decode` instead.
23-
* :c:func:`!PyUnicode_AsDecodedUnicode`:
24-
Use :c:func:`PyCodec_Decode` instead.
25-
* :c:func:`!PyUnicode_AsEncodedObject`:
26-
Use :c:func:`PyCodec_Encode` instead.
27-
* :c:func:`!PyUnicode_AsEncodedUnicode`:
28-
Use :c:func:`PyCodec_Encode` instead.
2921
* :c:func:`PyUnicode_READY`:
3022
Unneeded since Python 3.12
3123
* :c:func:`!PyErr_Display`:

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

+3
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,6 @@ although there is currently no date scheduled for their removal.
153153
:class:`~xml.etree.ElementTree.Element` is deprecated. In a future release it
154154
will always return ``True``. Prefer explicit ``len(elem)`` or
155155
``elem is not None`` tests instead.
156+
157+
* :func:`sys._clear_type_cache` is deprecated:
158+
use :func:`sys._clear_internal_caches` instead.

Doc/howto/index.rst

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Python Library Reference.
3434
mro.rst
3535
free-threading-python.rst
3636
free-threading-extensions.rst
37+
remote_debugging.rst
3738

3839
General:
3940

@@ -66,3 +67,4 @@ Debugging and profiling:
6667
* :ref:`gdb`
6768
* :ref:`instrumentation`
6869
* :ref:`perf_profiling`
70+
* :ref:`remote-debugging`

0 commit comments

Comments
 (0)