Skip to content

Commit 596ab9d

Browse files
committed
Merge branch 'main' into pythongh-116402
2 parents 0d3ac18 + 8fb88b2 commit 596ab9d

File tree

221 files changed

+7989
-4832
lines changed

Some content is hidden

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

221 files changed

+7989
-4832
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ Doc/c-api/stable.rst @encukou
214214
**/*idlelib* @terryjreedy
215215
/Doc/library/idle.rst @terryjreedy
216216

217+
**/*annotationlib* @JelleZijlstra
217218
**/*typing* @JelleZijlstra @AlexWaygood
218219

219220
**/*ftplib @giampaolo

.github/workflows/build.yml

+59-17
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
# }}
4949
#
5050
run-docs: ${{ steps.docs-changes.outputs.run-docs || false }}
51+
run-win-msi: ${{ steps.win-msi-changes.outputs.run-win-msi || false }}
5152
run_tests: ${{ steps.check.outputs.run_tests || false }}
5253
run_hypothesis: ${{ steps.check.outputs.run_hypothesis || false }}
5354
run_cifuzz: ${{ steps.check.outputs.run_cifuzz || false }}
@@ -123,6 +124,20 @@ jobs:
123124
id: docs-changes
124125
run: |
125126
echo "run-docs=true" >> "${GITHUB_OUTPUT}"
127+
- name: Get a list of the MSI installer-related files
128+
id: changed-win-msi-files
129+
uses: Ana06/[email protected]
130+
with:
131+
filter: |
132+
Tools/msi/**
133+
.github/workflows/reusable-windows-msi.yml
134+
format: csv # works for paths with spaces
135+
- name: Check for changes in MSI installer-related files
136+
if: >-
137+
steps.changed-win-msi-files.outputs.added_modified_renamed != ''
138+
id: win-msi-changes
139+
run: |
140+
echo "run-win-msi=true" >> "${GITHUB_OUTPUT}"
126141
127142
check-docs:
128143
name: Docs
@@ -218,28 +233,54 @@ jobs:
218233
arch: ${{ matrix.arch }}
219234
free-threading: ${{ matrix.free-threading }}
220235

221-
build_macos:
222-
name: 'macOS'
236+
build_windows_msi:
237+
name: >- # ${{ '' } is a hack to nest jobs under the same sidebar category
238+
Windows MSI${{ '' }}
223239
needs: check_source
224-
if: needs.check_source.outputs.run_tests == 'true'
225-
uses: ./.github/workflows/reusable-macos.yml
240+
if: fromJSON(needs.check_source.outputs.run-win-msi)
241+
strategy:
242+
matrix:
243+
arch:
244+
- x86
245+
- x64
246+
- arm64
247+
uses: ./.github/workflows/reusable-windows-msi.yml
226248
with:
227-
config_hash: ${{ needs.check_source.outputs.config_hash }}
228-
# Cirrus and macos-14 are M1, macos-13 is default GHA Intel.
229-
# Cirrus used for upstream, macos-14 for forks.
230-
os-matrix: '["ghcr.io/cirruslabs/macos-runner:sonoma", "macos-14", "macos-13"]'
249+
arch: ${{ matrix.arch }}
231250

232-
build_macos_free_threading:
233-
name: 'macOS (free-threading)'
251+
build_macos:
252+
name: >-
253+
macOS
254+
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
234255
needs: check_source
235256
if: needs.check_source.outputs.run_tests == 'true'
257+
strategy:
258+
fail-fast: false
259+
matrix:
260+
# Cirrus and macos-14 are M1, macos-13 is default GHA Intel.
261+
# macOS 13 only runs tests against the GIL-enabled CPython.
262+
# Cirrus used for upstream, macos-14 for forks.
263+
os:
264+
- ghcr.io/cirruslabs/macos-runner:sonoma
265+
- macos-14
266+
- macos-13
267+
is-fork: # only used for the exclusion trick
268+
- ${{ github.repository_owner != 'python' }}
269+
free-threading:
270+
- false
271+
- true
272+
exclude:
273+
- os: ghcr.io/cirruslabs/macos-runner:sonoma
274+
is-fork: true
275+
- os: macos-14
276+
is-fork: false
277+
- os: macos-13
278+
free-threading: true
236279
uses: ./.github/workflows/reusable-macos.yml
237280
with:
238281
config_hash: ${{ needs.check_source.outputs.config_hash }}
239-
free-threading: true
240-
# Cirrus and macos-14 are M1.
241-
# Cirrus used for upstream, macos-14 for forks.
242-
os-matrix: '["ghcr.io/cirruslabs/macos-runner:sonoma", "macos-14"]'
282+
free-threading: ${{ matrix.free-threading }}
283+
os: ${{ matrix.os }}
243284

244285
build_ubuntu:
245286
name: >-
@@ -307,7 +348,7 @@ jobs:
307348
with:
308349
save: false
309350
- name: Configure CPython
310-
run: ./configure --config-cache --with-pydebug --with-openssl=$OPENSSL_DIR
351+
run: ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl=$OPENSSL_DIR
311352
- name: Build CPython
312353
run: make -j4
313354
- name: Display build info
@@ -380,6 +421,7 @@ jobs:
380421
../cpython-ro-srcdir/configure \
381422
--config-cache \
382423
--with-pydebug \
424+
--enable-slower-safety \
383425
--with-openssl=$OPENSSL_DIR
384426
- name: Build CPython out-of-tree
385427
working-directory: ${{ env.CPYTHON_BUILDDIR }}
@@ -565,11 +607,11 @@ jobs:
565607
- check-docs
566608
- check_generated_files
567609
- build_macos
568-
- build_macos_free_threading
569610
- build_ubuntu
570611
- build_ubuntu_ssltests
571612
- build_wasi
572613
- build_windows
614+
- build_windows_msi
573615
- test_hypothesis
574616
- build_asan
575617
- build_tsan
@@ -584,6 +626,7 @@ jobs:
584626
with:
585627
allowed-failures: >-
586628
build_ubuntu_ssltests,
629+
build_windows_msi,
587630
cifuzz,
588631
test_hypothesis,
589632
allowed-skips: >-
@@ -599,7 +642,6 @@ jobs:
599642
&& '
600643
check_generated_files,
601644
build_macos,
602-
build_macos_free_threading,
603645
build_ubuntu,
604646
build_ubuntu_ssltests,
605647
build_wasi,

.github/workflows/build_msi.yml

-40
This file was deleted.

.github/workflows/reusable-macos.yml

+7-16
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ on:
88
required: false
99
type: boolean
1010
default: false
11-
os-matrix:
12-
required: false
11+
os:
12+
description: OS to run the job
13+
required: true
1314
type: string
1415

1516
jobs:
1617
build_macos:
17-
name: build and test (${{ matrix.os }})
18+
name: build and test (${{ inputs.os }})
1819
timeout-minutes: 60
1920
env:
2021
HOMEBREW_NO_ANALYTICS: 1
@@ -23,18 +24,7 @@ jobs:
2324
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
2425
PYTHONSTRICTEXTENSIONBUILD: 1
2526
TERM: linux
26-
strategy:
27-
fail-fast: false
28-
matrix:
29-
os: ${{fromJson(inputs.os-matrix)}}
30-
is-fork:
31-
- ${{ github.repository_owner != 'python' }}
32-
exclude:
33-
- os: "ghcr.io/cirruslabs/macos-runner:sonoma"
34-
is-fork: true
35-
- os: "macos-14"
36-
is-fork: false
37-
runs-on: ${{ matrix.os }}
27+
runs-on: ${{ inputs.os }}
3828
steps:
3929
- uses: actions/checkout@v4
4030
- name: Runner image version
@@ -43,7 +33,7 @@ jobs:
4333
uses: actions/cache@v4
4434
with:
4535
path: config.cache
46-
key: ${{ github.job }}-${{ matrix.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
36+
key: ${{ github.job }}-${{ inputs.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
4737
- name: Install Homebrew dependencies
4838
run: brew install pkg-config [email protected] xz gdbm tcl-tk
4939
- name: Configure CPython
@@ -53,6 +43,7 @@ jobs:
5343
./configure \
5444
--config-cache \
5545
--with-pydebug \
46+
--enable-slower-safety \
5647
${{ inputs.free-threading && '--disable-gil' || '' }} \
5748
--prefix=/opt/python-dev \
5849
--with-openssl="$(brew --prefix [email protected])"

.github/workflows/reusable-ubuntu.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,20 @@ jobs:
6767
working-directory: ${{ env.CPYTHON_BUILDDIR }}
6868
run: >-
6969
../cpython-ro-srcdir/configure
70+
CFLAGS="-fdiagnostics-format=json"
7071
--config-cache
7172
--with-pydebug
73+
--enable-slower-safety
7274
--with-openssl=$OPENSSL_DIR
7375
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
7476
- name: Build CPython out-of-tree
7577
working-directory: ${{ env.CPYTHON_BUILDDIR }}
76-
run: make -j4
78+
run: make -j4 &> compiler_output.txt
7779
- name: Display build info
7880
working-directory: ${{ env.CPYTHON_BUILDDIR }}
7981
run: make pythoninfo
82+
- name: Check compiler warnings
83+
run: python Tools/build/check_warnings.py --compiler-output-file-path=${{ env.CPYTHON_BUILDDIR }}/compiler_output.txt --warning-ignore-file-path ${GITHUB_WORKSPACE}/Tools/build/.warningignore_ubuntu
8084
- name: Remount sources writable for tests
8185
# some tests write to srcdir, lack of pyc files slows down testing
8286
run: sudo mount $CPYTHON_RO_SRCDIR -oremount,rw
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: TestsMSI
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
arch:
7+
description: CPU architecture
8+
required: true
9+
type: string
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
build:
16+
name: installer for ${{ inputs.arch }}
17+
runs-on: windows-latest
18+
timeout-minutes: 60
19+
env:
20+
IncludeFreethreaded: true
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Build CPython installer
24+
run: .\Tools\msi\build.bat --doc -${{ inputs.arch }}

Doc/.ruff.toml

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ line-length = 79
55
extend-exclude = [
66
"includes/*",
77
# Temporary exclusions:
8-
"tools/extensions/escape4chm.py",
98
"tools/extensions/pyspecific.py",
109
]
1110

Doc/bugs.rst

+2-7
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,16 @@ Documentation bugs
1616
==================
1717

1818
If you find a bug in this documentation or would like to propose an improvement,
19-
please submit a bug report on the :ref:`tracker <using-the-tracker>`. If you
19+
please submit a bug report on the :ref:`issue tracker <using-the-tracker>`. If you
2020
have a suggestion on how to fix it, include that as well.
2121

2222
You can also open a discussion item on our
2323
`Documentation Discourse forum <https://discuss.python.org/c/documentation/26>`_.
2424

2525
If you find a bug in the theme (HTML / CSS / JavaScript) of the
26-
documentation, please submit a bug report on the `python-doc-theme bug
26+
documentation, please submit a bug report on the `python-doc-theme issue
2727
tracker <https://github.com/python/python-docs-theme>`_.
2828

29-
If you're short on time, you can also email documentation bug reports to
30-
[email protected] (behavioral bugs can be sent to [email protected]).
31-
'docs@' is a mailing list run by volunteers; your request will be noticed,
32-
though it may take a while to be processed.
33-
3429
.. seealso::
3530

3631
`Documentation bugs`_

Doc/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
# ---------------------
2121

2222
extensions = [
23+
'audit_events',
2324
'c_annotations',
24-
'escape4chm',
2525
'glossary_search',
2626
'lexers',
2727
'pyspecific',

Doc/contents.rst

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
installing/index.rst
1515
howto/index.rst
1616
faq/index.rst
17+
deprecations/index.rst
1718
glossary.rst
1819

1920
about.rst
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
Pending Removal in Python 3.14
2+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3+
4+
* The ``ma_version_tag`` field in :c:type:`PyDictObject` for extension modules
5+
(:pep:`699`; :gh:`101193`).
6+
7+
* Creating :c:data:`immutable types <Py_TPFLAGS_IMMUTABLETYPE>` with mutable
8+
bases (:gh:`95388`).
9+
10+
* Functions to configure Python's initialization, deprecated in Python 3.11:
11+
12+
* ``PySys_SetArgvEx()``: set :c:member:`PyConfig.argv` instead.
13+
* ``PySys_SetArgv()``: set :c:member:`PyConfig.argv` instead.
14+
* ``Py_SetProgramName()``: set :c:member:`PyConfig.program_name` instead.
15+
* ``Py_SetPythonHome()``: set :c:member:`PyConfig.home` instead.
16+
17+
The :c:func:`Py_InitializeFromConfig` API should be used with
18+
:c:type:`PyConfig` instead.
19+
20+
* Global configuration variables:
21+
22+
* :c:var:`Py_DebugFlag`: use :c:member:`PyConfig.parser_debug` instead.
23+
* :c:var:`Py_VerboseFlag`: use :c:member:`PyConfig.verbose` instead.
24+
* :c:var:`Py_QuietFlag`: use :c:member:`PyConfig.quiet` instead.
25+
* :c:var:`Py_InteractiveFlag`: use :c:member:`PyConfig.interactive` instead.
26+
* :c:var:`Py_InspectFlag`: use :c:member:`PyConfig.inspect` instead.
27+
* :c:var:`Py_OptimizeFlag`: use :c:member:`PyConfig.optimization_level` instead.
28+
* :c:var:`Py_NoSiteFlag`: use :c:member:`PyConfig.site_import` instead.
29+
* :c:var:`Py_BytesWarningFlag`: use :c:member:`PyConfig.bytes_warning` instead.
30+
* :c:var:`Py_FrozenFlag`: use :c:member:`PyConfig.pathconfig_warnings` instead.
31+
* :c:var:`Py_IgnoreEnvironmentFlag`: use :c:member:`PyConfig.use_environment` instead.
32+
* :c:var:`Py_DontWriteBytecodeFlag`: use :c:member:`PyConfig.write_bytecode` instead.
33+
* :c:var:`Py_NoUserSiteDirectory`: use :c:member:`PyConfig.user_site_directory` instead.
34+
* :c:var:`Py_UnbufferedStdioFlag`: use :c:member:`PyConfig.buffered_stdio` instead.
35+
* :c:var:`Py_HashRandomizationFlag`: use :c:member:`PyConfig.use_hash_seed`
36+
and :c:member:`PyConfig.hash_seed` instead.
37+
* :c:var:`Py_IsolatedFlag`: use :c:member:`PyConfig.isolated` instead.
38+
* :c:var:`Py_LegacyWindowsFSEncodingFlag`: use :c:member:`PyPreConfig.legacy_windows_fs_encoding` instead.
39+
* :c:var:`Py_LegacyWindowsStdioFlag`: use :c:member:`PyConfig.legacy_windows_stdio` instead.
40+
* :c:var:`!Py_FileSystemDefaultEncoding`: use :c:member:`PyConfig.filesystem_encoding` instead.
41+
* :c:var:`!Py_HasFileSystemDefaultEncoding`: use :c:member:`PyConfig.filesystem_encoding` instead.
42+
* :c:var:`!Py_FileSystemDefaultEncodeErrors`: use :c:member:`PyConfig.filesystem_errors` instead.
43+
* :c:var:`!Py_UTF8Mode`: use :c:member:`PyPreConfig.utf8_mode` instead. (see :c:func:`Py_PreInitialize`)
44+
45+
The :c:func:`Py_InitializeFromConfig` API should be used with
46+
:c:type:`PyConfig` instead.

0 commit comments

Comments
 (0)