Skip to content

Commit 9cee9ff

Browse files
committed
Merge branch 'main' into tstrings
2 parents 8468e10 + 4c20f46 commit 9cee9ff

File tree

121 files changed

+13923
-2210
lines changed

Some content is hidden

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

121 files changed

+13923
-2210
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 4 deletions
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:

Doc/c-api/arg.rst

Lines changed: 2 additions & 0 deletions
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/init_config.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ Configuration Options
320320
* - ``"cpu_count"``
321321
- :c:member:`cpu_count <PyConfig.cpu_count>`
322322
- ``int``
323-
- Read-only
323+
- Public
324324
* - ``"dev_mode"``
325325
- :c:member:`dev_mode <PyConfig.dev_mode>`
326326
- ``bool``
@@ -619,6 +619,8 @@ Some options are read from the :mod:`sys` attributes. For example, the option
619619
The caller must have an :term:`attached thread state`. The function cannot
620620
be called before Python initialization nor after Python finalization.
621621
622+
.. audit-event:: cpython.PyConfig_Set name,value c.PyConfig_Set
623+
622624
.. versionadded:: 3.14
623625
624626

Doc/c-api/intro.rst

Lines changed: 1 addition & 1 deletion
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/deprecations/c-api-pending-removal-in-3.15.rst

Lines changed: 10 additions & 0 deletions
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

Lines changed: 0 additions & 8 deletions
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

Lines changed: 3 additions & 0 deletions
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/library/decimal.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,8 @@ Decimal objects
367367
appears above. These include decimal digits from various other
368368
alphabets (for example, Arabic-Indic and Devanāgarī digits) along
369369
with the fullwidth digits ``'\uff10'`` through ``'\uff19'``.
370+
Case is not significant, so, for example, ``inf``, ``Inf``, ``INFINITY``,
371+
and ``iNfINity`` are all acceptable spellings for positive infinity.
370372

371373
If *value* is a :class:`tuple`, it should have three components, a sign
372374
(``0`` for positive or ``1`` for negative), a :class:`tuple` of

Doc/library/fcntl.rst

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ descriptor.
7979
On macOS and NetBSD, the :mod:`!fcntl` module exposes the ``F_GETNOSIGPIPE``
8080
and ``F_SETNOSIGPIPE`` constant.
8181

82+
.. versionchanged:: next
83+
On Linux >= 6.1, the :mod:`!fcntl` module exposes the ``F_DUPFD_QUERY``
84+
to query a file descriptor pointing to the same file.
85+
8286
The module defines the following functions:
8387

8488

@@ -89,14 +93,14 @@ The module defines the following functions:
8993
for *cmd* are operating system dependent, and are available as constants
9094
in the :mod:`fcntl` module, using the same names as used in the relevant C
9195
header files. The argument *arg* can either be an integer value, a
92-
:class:`bytes` object, or a string.
96+
:term:`bytes-like object`, or a string.
9397
The type and size of *arg* must match the type and size of
9498
the argument of the operation as specified in the relevant C documentation.
9599

96100
When *arg* is an integer, the function returns the integer
97101
return value of the C :c:func:`fcntl` call.
98102

99-
When the argument is bytes, it represents a binary structure,
103+
When the argument is bytes-like object, it represents a binary structure,
100104
for example, created by :func:`struct.pack`.
101105
A string value is encoded to binary using the UTF-8 encoding.
102106
The binary data is copied to a buffer whose address is
@@ -117,6 +121,10 @@ The module defines the following functions:
117121

118122
.. audit-event:: fcntl.fcntl fd,cmd,arg fcntl.fcntl
119123

124+
.. versionchanged:: next
125+
Add support of arbitrary :term:`bytes-like objects <bytes-like object>`,
126+
not only :class:`bytes`.
127+
120128

121129
.. function:: ioctl(fd, request, arg=0, mutate_flag=True, /)
122130

@@ -173,6 +181,9 @@ The module defines the following functions:
173181

174182
.. audit-event:: fcntl.ioctl fd,request,arg fcntl.ioctl
175183

184+
.. versionchanged:: next
185+
The GIL is always released during a system call.
186+
System calls failing with EINTR are automatically retried.
176187

177188
.. function:: flock(fd, operation, /)
178189

Doc/library/gzip.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,10 @@ Example of how to GZIP compress a binary string::
258258
The basic data compression module needed to support the :program:`gzip` file
259259
format.
260260

261+
In case gzip (de)compression is a bottleneck, the `python-isal`_
262+
package speeds up (de)compression with a mostly compatible API.
263+
264+
.. _python-isal: https://github.com/pycompression/python-isal
261265

262266
.. program:: gzip
263267

0 commit comments

Comments
 (0)