Skip to content

Commit 838a2f2

Browse files
authored
Merge branch 'main' into 132413-take2
2 parents 318888a + 4f18916 commit 838a2f2

File tree

96 files changed

+11924
-2545
lines changed

Some content is hidden

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

96 files changed

+11924
-2545
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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,19 @@ small to receive the value.
274274
Convert a Python integer to a C :c:expr:`unsigned long` without
275275
overflow checking.
276276

277+
.. versionchanged:: next
278+
Use :meth:`~object.__index__` if available.
279+
277280
``L`` (:class:`int`) [long long]
278281
Convert a Python integer to a C :c:expr:`long long`.
279282

280283
``K`` (:class:`int`) [unsigned long long]
281284
Convert a Python integer to a C :c:expr:`unsigned long long`
282285
without overflow checking.
283286

287+
.. versionchanged:: next
288+
Use :meth:`~object.__index__` if available.
289+
284290
``n`` (:class:`int`) [:c:type:`Py_ssize_t`]
285291
Convert a Python integer to a C :c:type:`Py_ssize_t`.
286292

@@ -669,6 +675,8 @@ Building values
669675
``L`` (:class:`int`) [long long]
670676
Convert a C :c:expr:`long long` to a Python integer object.
671677
678+
.. _capi-py-buildvalue-format-K:
679+
672680
``K`` (:class:`int`) [unsigned long long]
673681
Convert a C :c:expr:`unsigned long long` to a Python integer object.
674682

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,8 @@ Constants
476476
network interface instead of its name.
477477

478478
.. versionchanged:: 3.14
479-
Added missing ``IP_RECVERR``, ``IPV6_RECVERR``, ``IP_RECVTTL``, and
480-
``IP_RECVORIGDSTADDR`` on Linux.
479+
Added missing ``IP_FREEBIND``, ``IP_RECVERR``, ``IPV6_RECVERR``,
480+
``IP_RECVTTL``, and ``IP_RECVORIGDSTADDR`` on Linux.
481481

482482
.. versionchanged:: 3.14
483483
Added support for ``TCP_QUICKACK`` on Windows platforms when available.

Doc/library/webbrowser.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,17 @@ If the environment variable :envvar:`BROWSER` exists, it is interpreted as the
2424
:data:`os.pathsep`-separated list of browsers to try ahead of the platform
2525
defaults. When the value of a list part contains the string ``%s``, then it is
2626
interpreted as a literal browser command line to be used with the argument URL
27-
substituted for ``%s``; if the part does not contain ``%s``, it is simply
28-
interpreted as the name of the browser to launch. [1]_
27+
substituted for ``%s``; if the value is a single word that refers to one of the
28+
already registered browsers this browser is added to the front of the search list;
29+
if the part does not contain ``%s``, it is simply interpreted as the name of the
30+
browser to launch. [1]_
31+
32+
.. versionchanged:: next
33+
34+
The :envvar:`BROWSER` variable can now also be used to reorder the list of
35+
platform defaults. This is particularly useful on macOS where the platform
36+
defaults do not refer to command-line tools on :envvar:`PATH`.
37+
2938

3039
For non-Unix platforms, or when a remote browser is available on Unix, the
3140
controlling process will not wait for the user to finish with the browser, but

Doc/using/configure.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Features and minimum versions required to build CPython:
2222

2323
* Support for threads.
2424

25-
* OpenSSL 1.1.1 is the minimum version and OpenSSL 3.0.9 is the recommended
25+
* OpenSSL 1.1.1 is the minimum version and OpenSSL 3.0.16 is the recommended
2626
minimum version for the :mod:`ssl` and :mod:`hashlib` extension modules.
2727

2828
* SQLite 3.15.2 for the :mod:`sqlite3` extension module.

Doc/whatsnew/3.14.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,6 +1246,9 @@ sys
12461246
* On FreeBSD, :data:`sys.platform` doesn't contain the major version anymore.
12471247
It is always ``'freebsd'``, instead of ``'freebsd13'`` or ``'freebsd14'``.
12481248

1249+
* Raise :exc:`DeprecationWarning` for :func:`sys._clear_type_cache`. This
1250+
function was deprecated in Python 3.13 but it didn't raise a runtime warning.
1251+
12491252

12501253
sys.monitoring
12511254
--------------
@@ -1421,6 +1424,17 @@ uuid
14211424
(Contributed by Simon Legner in :gh:`131236`.)
14221425

14231426

1427+
webbrowser
1428+
----------
1429+
1430+
* Names in the :envvar:`BROWSER` environment variable can now refer to already
1431+
registered browsers for the :mod:`webbrowser` module, instead of always
1432+
generating a new browser command.
1433+
1434+
This makes it possible to set :envvar:`BROWSER` to the value of one of the
1435+
supported browsers on macOS.
1436+
1437+
14241438
zipinfo
14251439
-------
14261440

@@ -2059,6 +2073,11 @@ New features
20592073
Adding ``?`` after any format unit makes ``None`` be accepted as a value.
20602074
(Contributed by Serhiy Storchaka in :gh:`112068`.)
20612075

2076+
* The ``k`` and ``K`` formats in :c:func:`PyArg_ParseTuple` and
2077+
similar functions now use :meth:`~object.__index__` if available,
2078+
like all other integer formats.
2079+
(Contributed by Serhiy Storchaka in :gh:`112068`.)
2080+
20622081
* Add macros :c:func:`Py_PACK_VERSION` and :c:func:`Py_PACK_FULL_VERSION` for
20632082
bit-packing Python version numbers.
20642083
(Contributed by Petr Viktorin in :gh:`128629`.)

0 commit comments

Comments
 (0)