Skip to content

Commit 0eaddae

Browse files
authored
Merge branch '3.14' into 131769-wasi-pydebug
2 parents dad0229 + 5632e93 commit 0eaddae

458 files changed

Lines changed: 41385 additions & 2610 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: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,53 @@ jobs:
4343
if: fromJSON(needs.build-context.outputs.run-docs)
4444
uses: ./.github/workflows/reusable-docs.yml
4545

46+
check-abi:
47+
name: 'Check if the ABI has changed'
48+
runs-on: ubuntu-22.04 # 24.04 causes spurious errors
49+
needs: build-context
50+
if: needs.build-context.outputs.run-tests == 'true'
51+
steps:
52+
- uses: actions/checkout@v4
53+
with:
54+
persist-credentials: false
55+
- uses: actions/setup-python@v5
56+
with:
57+
python-version: '3.x'
58+
- name: Install dependencies
59+
run: |
60+
sudo ./.github/workflows/posix-deps-apt.sh
61+
sudo apt-get install -yq abigail-tools
62+
- name: Build CPython
63+
env:
64+
CFLAGS: -g3 -O0
65+
run: |
66+
# Build Python with the libpython dynamic library
67+
./configure --enable-shared
68+
make -j4
69+
- name: Check for changes in the ABI
70+
id: check
71+
run: |
72+
if ! make check-abidump; then
73+
echo "Generated ABI file is not up to date."
74+
echo "Please add the release manager of this branch as a reviewer of this PR."
75+
echo ""
76+
echo "The up to date ABI file should be attached to this build as an artifact."
77+
echo ""
78+
echo "To learn more about this check: https://devguide.python.org/getting-started/setup-building/index.html#regenerate-the-abi-dump"
79+
echo ""
80+
exit 1
81+
fi
82+
- name: Generate updated ABI files
83+
if: ${{ failure() && steps.check.conclusion == 'failure' }}
84+
run: |
85+
make regen-abidump
86+
- uses: actions/upload-artifact@v4
87+
name: Publish updated ABI files
88+
if: ${{ failure() && steps.check.conclusion == 'failure' }}
89+
with:
90+
name: abi-data
91+
path: ./Doc/data/*.abi
92+
4693
check-autoconf-regen:
4794
name: 'Check if Autoconf files are up to date'
4895
# Don't use ubuntu-latest but a specific version to make the job

.github/workflows/mypy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ on:
1313
- "Lib/test/libregrtest/**"
1414
- "Lib/tomllib/**"
1515
- "Misc/mypy/**"
16+
- "Tools/build/compute-changes.py"
1617
- "Tools/build/generate_sbom.py"
18+
- "Tools/build/generate-build-details.py"
19+
- "Tools/build/verify_ensurepip_wheels.py"
20+
- "Tools/build/update_file.py"
1721
- "Tools/cases_generator/**"
1822
- "Tools/clinic/**"
1923
- "Tools/jit/**"

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,3 @@ Python/frozen_modules/MANIFEST
170170
# Ignore ./python binary on Unix but still look into ./Python/ directory.
171171
/python
172172
!/Python/
173-
174-
# main branch only: ABI files are not checked/maintained.
175-
Doc/data/python*.abi

Doc/c-api/arg.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ 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
277+
.. versionchanged:: 3.14
278278
Use :meth:`~object.__index__` if available.
279279

280280
``L`` (:class:`int`) [long long]
@@ -284,7 +284,7 @@ small to receive the value.
284284
Convert a Python integer to a C :c:expr:`unsigned long long`
285285
without overflow checking.
286286

287-
.. versionchanged:: next
287+
.. versionchanged:: 3.14
288288
Use :meth:`~object.__index__` if available.
289289

290290
``n`` (:class:`int`) [:c:type:`Py_ssize_t`]
@@ -380,10 +380,10 @@ Other objects
380380
The *converter* for the ``O&`` format unit in *items* must not store
381381
a borrowed buffer or a borrowed reference.
382382

383-
.. versionchanged:: next
383+
.. versionchanged:: 3.14
384384
:class:`str` and :class:`bytearray` objects no longer accepted as a sequence.
385385

386-
.. deprecated:: next
386+
.. deprecated:: 3.14
387387
Non-tuple sequences are deprecated if *items* contains format units
388388
which store a borrowed buffer or a borrowed reference.
389389

@@ -396,7 +396,7 @@ Other objects
396396
If the argument is not ``None``, it is parsed according to the specified
397397
format unit.
398398

399-
.. versionadded:: next
399+
.. versionadded:: 3.14
400400

401401
A few other characters have a meaning in a format string. These may not occur
402402
inside nested parentheses. They are:

Doc/c-api/init.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
203203

204204
Set by the :option:`-i` option.
205205

206-
.. deprecated:: 3.12
206+
.. deprecated-removed:: 3.12 3.15
207207

208208
.. c:var:: int Py_IsolatedFlag
209209

Doc/c-api/init_config.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ Configuration Options
363363
- Read-only
364364
* - ``"import_time"``
365365
- :c:member:`import_time <PyConfig.import_time>`
366-
- ``bool``
366+
- ``int``
367367
- Read-only
368368
* - ``"inspect"``
369369
- :c:member:`inspect <PyConfig.inspect>`
@@ -1477,13 +1477,19 @@ PyConfig
14771477
14781478
.. c:member:: int import_time
14791479
1480-
If non-zero, profile import time.
1480+
If ``1``, profile import time.
1481+
If ``2``, include additional output that indicates
1482+
when an imported module has already been loaded.
14811483
1482-
Set the ``1`` by the :option:`-X importtime <-X>` option and the
1484+
Set by the :option:`-X importtime <-X>` option and the
14831485
:envvar:`PYTHONPROFILEIMPORTTIME` environment variable.
14841486
14851487
Default: ``0``.
14861488
1489+
.. versionchanged:: 3.14
1490+
1491+
Added support for ``import_time = 2``
1492+
14871493
.. c:member:: int inspect
14881494
14891495
Enter interactive mode after executing a script or a command.

Doc/c-api/unicode.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,17 @@ APIs:
645645
difference being that it decrements the reference count of *right* by one.
646646
647647
648+
.. c:function:: PyObject* PyUnicode_BuildEncodingMap(PyObject* string)
649+
650+
Return a mapping suitable for decoding a custom single-byte encoding.
651+
Given a Unicode string *string* of up to 256 characters representing an encoding
652+
table, returns either a compact internal mapping object or a dictionary
653+
mapping character ordinals to byte values. Raises a :exc:`TypeError` and
654+
return ``NULL`` on invalid input.
655+
656+
.. versionadded:: 3.2
657+
658+
648659
.. c:function:: const char* PyUnicode_GetDefaultEncoding(void)
649660
650661
Return the name of the default string encoding, ``"utf-8"``.

0 commit comments

Comments
 (0)