Skip to content

Commit 5f2eaa2

Browse files
Merge branch 'main' into initconfig
2 parents 54a200f + 0055140 commit 5f2eaa2

File tree

277 files changed

+7901
-2919
lines changed

Some content is hidden

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

277 files changed

+7901
-2919
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,4 @@ Tools/peg_generator/pegen/grammar_parser.py generated
112112
aclocal.m4 generated
113113
configure generated
114114
*.min.js generated
115+
package-lock.json generated

.github/CODEOWNERS

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -427,19 +427,19 @@ Lib/dataclasses.py @ericvsmith
427427
Lib/test/test_dataclasses/ @ericvsmith
428428

429429
# Dates and times
430-
Doc/**/*time.rst @pganssle @abalkin @StanFromIreland
430+
Doc/**/*time.rst @pganssle @StanFromIreland
431431
Doc/library/datetime-* @pganssle @StanFromIreland
432432
Doc/library/zoneinfo.rst @pganssle @StanFromIreland
433-
Include/datetime.h @pganssle @abalkin @StanFromIreland
434-
Include/internal/pycore_time.h @pganssle @abalkin @StanFromIreland
433+
Include/datetime.h @pganssle @StanFromIreland
434+
Include/internal/pycore_time.h @pganssle @StanFromIreland
435435
Lib/test/test_zoneinfo/ @pganssle @StanFromIreland
436436
Lib/zoneinfo/ @pganssle @StanFromIreland
437-
Lib/*time.py @pganssle @abalkin @StanFromIreland
438-
Lib/test/datetimetester.py @pganssle @abalkin @StanFromIreland
439-
Lib/test/test_*time.py @pganssle @abalkin @StanFromIreland
437+
Lib/*time.py @pganssle @StanFromIreland
438+
Lib/test/datetimetester.py @pganssle @StanFromIreland
439+
Lib/test/test_*time.py @pganssle @StanFromIreland
440440
Modules/*zoneinfo* @pganssle @StanFromIreland
441-
Modules/*time* @pganssle @abalkin @StanFromIreland
442-
Python/pytime.c @pganssle @abalkin @StanFromIreland
441+
Modules/*time* @pganssle @StanFromIreland
442+
Python/pytime.c @pganssle @StanFromIreland
443443

444444
# Dbm
445445
Doc/library/dbm.rst @corona10 @erlend-aasland @serhiy-storchaka

.github/actionlint.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
self-hosted-runner:
2+
# Pending release of actionlint > 1.7.11 for macos-26-intel support
3+
# https://github.com/rhysd/actionlint/pull/629
4+
labels: ["macos-26-intel"]
5+
16
config-variables: null
27

38
paths:

.github/workflows/build.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,16 +198,16 @@ jobs:
198198
strategy:
199199
fail-fast: false
200200
matrix:
201-
# macos-14 is M1, macos-15-intel is Intel.
202-
# macos-15-intel only runs tests against the GIL-enabled CPython.
201+
# macos-26 is Apple Silicon, macos-26-intel is Intel.
202+
# macos-26-intel only runs tests against the GIL-enabled CPython.
203203
os:
204-
- macos-14
205-
- macos-15-intel
204+
- macos-26
205+
- macos-26-intel
206206
free-threading:
207207
- false
208208
- true
209209
exclude:
210-
- os: macos-15-intel
210+
- os: macos-26-intel
211211
free-threading: true
212212
uses: ./.github/workflows/reusable-macos.yml
213213
with:
@@ -336,7 +336,7 @@ jobs:
336336
matrix:
337337
include:
338338
- arch: aarch64
339-
runs-on: macos-14
339+
runs-on: macos-26
340340
- arch: x86_64
341341
runs-on: ubuntu-24.04
342342

@@ -371,6 +371,12 @@ jobs:
371371
- name: Build and test
372372
run: python3 Apple ci iOS --fast-ci --simulator 'iPhone SE (3rd generation),OS=17.5'
373373

374+
build-emscripten:
375+
name: 'Emscripten'
376+
needs: build-context
377+
if: needs.build-context.outputs.run-emscripten == 'true'
378+
uses: ./.github/workflows/reusable-emscripten.yml
379+
374380
build-wasi:
375381
name: 'WASI'
376382
needs: build-context
@@ -650,6 +656,7 @@ jobs:
650656
- build-ubuntu
651657
- build-ubuntu-ssltests
652658
- build-ios
659+
- build-emscripten
653660
- build-wasi
654661
- test-hypothesis
655662
- build-asan
@@ -664,6 +671,7 @@ jobs:
664671
with:
665672
allowed-failures: >-
666673
build-android,
674+
build-emscripten,
667675
build-windows-msi,
668676
build-ubuntu-ssltests,
669677
test-hypothesis,
@@ -706,5 +714,6 @@ jobs:
706714
}}
707715
${{ !fromJSON(needs.build-context.outputs.run-android) && 'build-android,' || '' }}
708716
${{ !fromJSON(needs.build-context.outputs.run-ios) && 'build-ios,' || '' }}
717+
${{ !fromJSON(needs.build-context.outputs.run-emscripten) && 'build-emscripten,' || '' }}
709718
${{ !fromJSON(needs.build-context.outputs.run-wasi) && 'build-wasi,' || '' }}
710719
jobs: ${{ toJSON(needs) }}

.github/workflows/jit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ jobs:
9999
- false
100100
include:
101101
- target: x86_64-apple-darwin/clang
102-
runner: macos-15-intel
102+
runner: macos-26-intel
103103
- target: aarch64-apple-darwin/clang
104-
runner: macos-14
104+
runner: macos-26
105105
steps:
106106
- uses: actions/checkout@v6
107107
with:

.github/workflows/reusable-context.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ on: # yamllint disable-line rule:truthy
4141
run-ubuntu:
4242
description: Whether to run the Ubuntu tests
4343
value: ${{ jobs.compute-changes.outputs.run-ubuntu }} # bool
44+
run-emscripten:
45+
description: Whether to run the Emscripten tests
46+
value: ${{ jobs.compute-changes.outputs.run-emscripten }} # bool
4447
run-wasi:
4548
description: Whether to run the WASI tests
4649
value: ${{ jobs.compute-changes.outputs.run-wasi }} # bool
@@ -65,6 +68,7 @@ jobs:
6568
run-macos: ${{ steps.changes.outputs.run-macos }}
6669
run-tests: ${{ steps.changes.outputs.run-tests }}
6770
run-ubuntu: ${{ steps.changes.outputs.run-ubuntu }}
71+
run-emscripten: ${{ steps.changes.outputs.run-emscripten }}
6872
run-wasi: ${{ steps.changes.outputs.run-wasi }}
6973
run-windows-msi: ${{ steps.changes.outputs.run-windows-msi }}
7074
run-windows-tests: ${{ steps.changes.outputs.run-windows-tests }}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Reusable Emscripten
2+
3+
on:
4+
workflow_call:
5+
6+
env:
7+
FORCE_COLOR: 1
8+
9+
jobs:
10+
build-emscripten-reusable:
11+
name: 'build and test'
12+
runs-on: ubuntu-24.04
13+
timeout-minutes: 60
14+
steps:
15+
- uses: actions/checkout@v6
16+
with:
17+
persist-credentials: false
18+
- name: "Read Emscripten config"
19+
id: emscripten-config
20+
shell: python
21+
run: |
22+
import hashlib
23+
import json
24+
import os
25+
import tomllib
26+
from pathlib import Path
27+
28+
config = tomllib.loads(Path("Platforms/emscripten/config.toml").read_text())
29+
h = hashlib.sha256()
30+
h.update(json.dumps(config["dependencies"], sort_keys=True).encode())
31+
h.update(Path("Platforms/emscripten/make_libffi.sh").read_bytes())
32+
h.update(b'1') # Update to explicitly bust cache
33+
emsdk_cache = Path(os.environ["RUNNER_TEMP"]) / "emsdk-cache"
34+
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
35+
f.write(f"emscripten-version={config['emscripten-version']}\n")
36+
f.write(f"node-version={config['node-version']}\n")
37+
f.write(f"deps-hash={h.hexdigest()}\n")
38+
with open(os.environ["GITHUB_ENV"], "a") as f:
39+
f.write(f"EMSDK_CACHE={emsdk_cache}\n")
40+
- name: "Install Node.js"
41+
uses: actions/setup-node@v6
42+
with:
43+
node-version: ${{ steps.emscripten-config.outputs.node-version }}
44+
- name: "Cache Emscripten SDK"
45+
id: emsdk-cache
46+
uses: actions/cache@v5
47+
with:
48+
path: ${{ env.EMSDK_CACHE }}
49+
key: emsdk-${{ steps.emscripten-config.outputs.emscripten-version }}-${{ steps.emscripten-config.outputs.deps-hash }}
50+
restore-keys: emsdk-${{ steps.emscripten-config.outputs.emscripten-version }}
51+
- name: "Install Python"
52+
uses: actions/setup-python@v6
53+
with:
54+
python-version: '3.x'
55+
- name: "Runner image version"
56+
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
57+
- name: "Install Emscripten"
58+
run: python3 Platforms/emscripten install-emscripten
59+
- name: "Configure build Python"
60+
run: python3 Platforms/emscripten configure-build-python -- --config-cache --with-pydebug
61+
- name: "Make build Python"
62+
run: python3 Platforms/emscripten make-build-python
63+
- name: "Make dependencies"
64+
run: >-
65+
python3 Platforms/emscripten make-dependencies
66+
${{ steps.emsdk-cache.outputs.cache-hit == 'true' && '--check-up-to-date' || '' }}
67+
- name: "Configure host Python"
68+
run: python3 Platforms/emscripten configure-host --host-runner node -- --config-cache
69+
- name: "Make host Python"
70+
run: python3 Platforms/emscripten make-host
71+
- name: "Display build info"
72+
run: python3 Platforms/emscripten run --pythoninfo
73+
- name: "Test"
74+
run: python3 Platforms/emscripten run --test

.github/workflows/reusable-macos.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ jobs:
5252
--prefix=/opt/python-dev \
5353
--with-openssl="$(brew --prefix openssl@3.5)"
5454
- name: Build CPython
55-
if : ${{ inputs.free-threading || inputs.os != 'macos-15-intel' }}
55+
if : ${{ inputs.free-threading || inputs.os != 'macos-26-intel' }}
5656
run: gmake -j8
5757
- name: Build CPython for compiler warning check
58-
if : ${{ !inputs.free-threading && inputs.os == 'macos-15-intel' }}
58+
if : ${{ !inputs.free-threading && inputs.os == 'macos-26-intel' }}
5959
run: set -o pipefail; gmake -j8 --output-sync 2>&1 | tee compiler_output_macos.txt
6060
- name: Display build info
6161
run: make pythoninfo
6262
- name: Check compiler warnings
63-
if : ${{ !inputs.free-threading && inputs.os == 'macos-15-intel' }}
63+
if : ${{ !inputs.free-threading && inputs.os == 'macos-26-intel' }}
6464
run: >-
6565
python3 Tools/build/check_warnings.py
6666
--compiler-output-file-path=compiler_output_macos.txt

.github/workflows/tail-call.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ jobs:
6767
matrix:
6868
include:
6969
- target: x86_64-apple-darwin/clang
70-
runner: macos-15-intel
70+
runner: macos-26-intel
7171
- target: aarch64-apple-darwin/clang
72-
runner: macos-14
72+
runner: macos-26
7373
steps:
7474
- uses: actions/checkout@v6
7575
with:

Doc/c-api/intro.rst

Lines changed: 70 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -526,14 +526,26 @@ to the C language.
526526
Outdated macros
527527
---------------
528528

529-
The following macros have been used to features that have been standardized
530-
in C11.
529+
The following :term:`soft deprecated` macros have been used to features that
530+
have been standardized in C11 (or previous standards).
531531

532532
.. c:macro:: Py_ALIGNED(num)
533533
534-
Specify alignment to *num* bytes on compilers that support it.
534+
On some GCC-like compilers, specify alignment to *num* bytes.
535+
This does nothing on other compilers.
535536

536-
Consider using the C11 standard ``_Alignas`` specifier over this macro.
537+
Use the standard ``alignas`` specifier rather than this macro.
538+
539+
.. deprecated:: next
540+
The macro is :term:`soft deprecated`.
541+
542+
.. c:macro:: PY_FORMAT_SIZE_T
543+
544+
The :c:func:`printf` formatting modifier for :c:type:`size_t`.
545+
Use ``"z"`` directly instead.
546+
547+
.. deprecated:: next
548+
The macro is :term:`soft deprecated`.
537549

538550
.. c:macro:: Py_LL(number)
539551
Py_ULL(number)
@@ -546,6 +558,38 @@ in C11.
546558
547559
Consider using the C99 standard suffixes ``LL`` and ``LLU`` directly.
548560
561+
.. deprecated:: next
562+
The macro is :term:`soft deprecated`.
563+
564+
.. c:macro:: PY_LONG_LONG
565+
PY_INT32_T
566+
PY_UINT32_T
567+
PY_INT64_T
568+
PY_UINT64_T
569+
570+
Aliases for the types :c:type:`!long long`, :c:type:`!int32_t`,
571+
:c:type:`!uint32_t`. :c:type:`!int64_t` and :c:type:`!uint64_t`,
572+
respectively.
573+
Historically, these types needed compiler-specific extensions.
574+
575+
.. deprecated:: next
576+
These macros are :term:`soft deprecated`.
577+
578+
.. c:macro:: PY_LLONG_MIN
579+
PY_LLONG_MAX
580+
PY_ULLONG_MAX
581+
PY_SIZE_MAX
582+
583+
Aliases for the values :c:macro:`!LLONG_MIN`, :c:macro:`!LLONG_MAX`,
584+
:c:macro:`!ULLONG_MAX`, and :c:macro:`!SIZE_MAX`, respectively.
585+
Use these standard names instead.
586+
587+
The required header, ``<limits.h>``,
588+
:ref:`is included <capi-system-includes>` in ``Python.h``.
589+
590+
.. deprecated:: next
591+
These macros are :term:`soft deprecated`.
592+
549593
.. c:macro:: Py_MEMCPY(dest, src, n)
550594
551595
This is a :term:`soft deprecated` alias to :c:func:`!memcpy`.
@@ -554,6 +598,25 @@ in C11.
554598
.. deprecated:: 3.14
555599
The macro is :term:`soft deprecated`.
556600
601+
.. c:macro:: Py_UNICODE_SIZE
602+
603+
Size of the :c:type:`!wchar_t` type.
604+
Use ``sizeof(wchar_t)`` or ``WCHAR_WIDTH/8`` instead.
605+
606+
The required header for the latter, ``<limits.h>``,
607+
:ref:`is included <capi-system-includes>` in ``Python.h``.
608+
609+
.. deprecated:: next
610+
The macro is :term:`soft deprecated`.
611+
612+
.. c:macro:: Py_UNICODE_WIDE
613+
614+
Defined if ``wchar_t`` can hold a Unicode character (UCS-4).
615+
Use ``sizeof(wchar_t) >= 4`` instead
616+
617+
.. deprecated:: next
618+
The macro is :term:`soft deprecated`.
619+
557620
.. c:macro:: Py_VA_COPY
558621
559622
This is a :term:`soft deprecated` alias to the C99-standard ``va_copy``
@@ -564,6 +627,9 @@ in C11.
564627
.. versionchanged:: 3.6
565628
This is now an alias to ``va_copy``.
566629
630+
.. deprecated:: next
631+
The macro is :term:`soft deprecated`.
632+
567633
568634
.. _api-objects:
569635

0 commit comments

Comments
 (0)