Skip to content

Commit 5fb7d28

Browse files
committed
Merge branch 'main' into pythongh-77609-glob-follow-symlinks
2 parents 6f7a83a + da1980a commit 5fb7d28

File tree

884 files changed

+46558
-28733
lines changed

Some content is hidden

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

884 files changed

+46558
-28733
lines changed

Diff for: .devcontainer/Dockerfile

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM docker.io/library/fedora:37
2+
3+
ENV CC=clang
4+
5+
ENV WASI_SDK_VERSION=19
6+
ENV WASI_SDK_PATH=/opt/wasi-sdk
7+
8+
ENV WASMTIME_HOME=/opt/wasmtime
9+
ENV WASMTIME_VERSION=7.0.0
10+
ENV WASMTIME_CPU_ARCH=x86_64
11+
12+
RUN dnf -y --nodocs --setopt=install_weak_deps=False install /usr/bin/{blurb,clang,curl,git,ln,tar,xz} 'dnf-command(builddep)' && \
13+
dnf -y --nodocs --setopt=install_weak_deps=False builddep python3 && \
14+
dnf -y clean all
15+
16+
RUN mkdir ${WASI_SDK_PATH} && \
17+
curl --location https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-linux.tar.gz | \
18+
tar --strip-components 1 --directory ${WASI_SDK_PATH} --extract --gunzip
19+
20+
RUN mkdir --parents ${WASMTIME_HOME} && \
21+
curl --location "https://github.com/bytecodealliance/wasmtime/releases/download/v${WASMTIME_VERSION}/wasmtime-v${WASMTIME_VERSION}-${WASMTIME_CPU_ARCH}-linux.tar.xz" | \
22+
xz --decompress | \
23+
tar --strip-components 1 --directory ${WASMTIME_HOME} -x && \
24+
ln -s ${WASMTIME_HOME}/wasmtime /usr/local/bin

Diff for: .devcontainer/devcontainer.json

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"build": {
3+
"dockerfile": "Dockerfile"
4+
},
5+
"onCreateCommand": [
6+
// Install common tooling.
7+
"dnf",
8+
"install",
9+
"-y",
10+
"which",
11+
"zsh",
12+
"fish"
13+
],
14+
"updateContentCommand": {
15+
// Using the shell for `nproc` usage.
16+
"python": "./configure --config-cache --with-pydebug && make -s -j `nproc`",
17+
"docs": [
18+
"make",
19+
"--directory",
20+
"Doc",
21+
"venv",
22+
"html"
23+
]
24+
},
25+
"customizations": {
26+
"vscode": {
27+
"extensions": [
28+
// Highlighting for Parser/Python.asdl.
29+
"brettcannon.zephyr-asdl",
30+
// Highlighting for configure.ac.
31+
"maelvalais.autoconf",
32+
// C auto-complete.
33+
"ms-vscode.cpptools",
34+
// To view built docs.
35+
"ms-vscode.live-server"
36+
// https://github.com/microsoft/vscode-python/issues/18073
37+
// "ms-python.python"
38+
],
39+
"settings": {
40+
"C_Cpp.default.compilerPath": "/usr/bin/clang",
41+
"C_Cpp.default.cStandard": "c11",
42+
"C_Cpp.default.defines": [
43+
"CONFIG_64",
44+
"Py_BUILD_CORE"
45+
],
46+
"C_Cpp.default.includePath": [
47+
"${workspaceFolder}/*",
48+
"${workspaceFolder}/Include/**"
49+
],
50+
// https://github.com/microsoft/vscode-cpptools/issues/10732
51+
"C_Cpp.errorSquiggles": "disabled",
52+
"editor.insertSpaces": true,
53+
"editor.rulers": [
54+
80
55+
],
56+
"editor.tabSize": 4,
57+
"editor.trimAutoWhitespace": true,
58+
"files.associations": {
59+
"*.h": "c"
60+
},
61+
"files.encoding": "utf8",
62+
"files.eol": "\n",
63+
"files.insertFinalNewline": true,
64+
"files.trimTrailingWhitespace": true,
65+
"python.analysis.diagnosticSeverityOverrides": {
66+
// Complains about shadowing the stdlib w/ the stdlib.
67+
"reportShadowedImports": "none",
68+
// Doesn't like _frozen_importlib.
69+
"reportMissingImports": "none"
70+
},
71+
"python.analysis.extraPaths": [
72+
"Lib"
73+
],
74+
"python.defaultInterpreterPath": "./python",
75+
"[restructuredtext]": {
76+
"editor.tabSize": 3
77+
}
78+
}
79+
}
80+
}
81+
}

Diff for: .gitattributes

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ Lib/test/test_importlib/resources/data01/* noeol
3232
Lib/test/test_importlib/resources/namespacedata01/* noeol
3333
Lib/test/xmltestdata/* noeol
3434

35+
# Shell scripts should have LF even on Windows because of Cygwin
36+
Lib/venv/scripts/common/activate text eol=lf
37+
Lib/venv/scripts/posix/* text eol=lf
38+
3539
# CRLF files
3640
[attr]dos text eol=crlf
3741

Diff for: .github/CODEOWNERS

+5-7
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
# https://git-scm.com/docs/gitignore#_pattern_format
66

77
# GitHub
8-
.github/** @ezio-melotti
8+
.github/** @ezio-melotti @hugovk
99

1010
# Build system
1111
configure* @erlend-aasland @corona10
1212

1313
# asyncio
14-
**/*asyncio* @1st1 @asvetlov @gvanrossum @kumaraditya303
14+
**/*asyncio* @1st1 @asvetlov @gvanrossum @kumaraditya303 @willingc
1515

1616
# Core
1717
**/*context* @1st1
@@ -25,6 +25,8 @@ Objects/frameobject.c @markshannon
2525
Objects/call.c @markshannon
2626
Python/ceval.c @markshannon
2727
Python/compile.c @markshannon @iritkatriel
28+
Python/assemble.c @markshannon @iritkatriel
29+
Python/flowgraph.c @markshannon @iritkatriel
2830
Python/ast_opt.c @isidentical
2931
Lib/test/test_patma.py @brandtbucher
3032
Lib/test/test_peepholer.py @brandtbucher
@@ -61,11 +63,7 @@ Python/traceback.c @iritkatriel
6163
/Tools/build/parse_html5_entities.py @ezio-melotti
6264

6365
# Import (including importlib).
64-
# Ignoring importlib.h so as to not get flagged on
65-
# all pull requests that change the emitted
66-
# bytecode.
67-
**/*import*.c @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
68-
**/*import*.py @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
66+
**/*import* @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
6967
**/*importlib/resources/* @jaraco @warsaw @FFY00
7068
**/importlib/metadata/* @jaraco @warsaw
7169

Diff for: .github/workflows/build.yml

+15-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
check_source:
3434
name: 'Check for source changes'
3535
runs-on: ubuntu-latest
36+
timeout-minutes: 10
3637
outputs:
3738
run_tests: ${{ steps.check.outputs.run_tests }}
3839
steps:
@@ -63,6 +64,7 @@ jobs:
6364
check_generated_files:
6465
name: 'Check if generated files are up to date'
6566
runs-on: ubuntu-latest
67+
timeout-minutes: 60
6668
needs: check_source
6769
if: needs.check_source.outputs.run_tests == 'true'
6870
steps:
@@ -111,10 +113,14 @@ jobs:
111113
run: make smelly
112114
- name: Check limited ABI symbols
113115
run: make check-limited-abi
116+
- name: Check for unsupported C global variables
117+
if: github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
118+
run: make check-c-globals
114119

115120
build_win32:
116121
name: 'Windows (x86)'
117122
runs-on: windows-latest
123+
timeout-minutes: 60
118124
needs: check_source
119125
if: needs.check_source.outputs.run_tests == 'true'
120126
env:
@@ -123,7 +129,6 @@ jobs:
123129
- uses: actions/checkout@v3
124130
- name: Build CPython
125131
run: .\PCbuild\build.bat -e -d -p Win32
126-
timeout-minutes: 30
127132
- name: Display build info
128133
run: .\python.bat -m test.pythoninfo
129134
- name: Tests
@@ -132,6 +137,7 @@ jobs:
132137
build_win_amd64:
133138
name: 'Windows (x64)'
134139
runs-on: windows-latest
140+
timeout-minutes: 60
135141
needs: check_source
136142
if: needs.check_source.outputs.run_tests == 'true'
137143
env:
@@ -142,7 +148,6 @@ jobs:
142148
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
143149
- name: Build CPython
144150
run: .\PCbuild\build.bat -e -d -p x64
145-
timeout-minutes: 30
146151
- name: Display build info
147152
run: .\python.bat -m test.pythoninfo
148153
- name: Tests
@@ -151,6 +156,7 @@ jobs:
151156
build_macos:
152157
name: 'macOS'
153158
runs-on: macos-latest
159+
timeout-minutes: 60
154160
needs: check_source
155161
if: needs.check_source.outputs.run_tests == 'true'
156162
env:
@@ -181,6 +187,7 @@ jobs:
181187
build_ubuntu:
182188
name: 'Ubuntu'
183189
runs-on: ubuntu-20.04
190+
timeout-minutes: 60
184191
needs: check_source
185192
if: needs.check_source.outputs.run_tests == 'true'
186193
env:
@@ -238,6 +245,7 @@ jobs:
238245
build_ubuntu_ssltests:
239246
name: 'Ubuntu SSL tests with OpenSSL'
240247
runs-on: ubuntu-20.04
248+
timeout-minutes: 60
241249
needs: check_source
242250
if: needs.check_source.outputs.run_tests == 'true'
243251
strategy:
@@ -287,6 +295,7 @@ jobs:
287295
build_asan:
288296
name: 'Address sanitizer'
289297
runs-on: ubuntu-20.04
298+
timeout-minutes: 60
290299
needs: check_source
291300
if: needs.check_source.outputs.run_tests == 'true'
292301
env:
@@ -299,6 +308,10 @@ jobs:
299308
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
300309
- name: Install Dependencies
301310
run: sudo ./.github/workflows/posix-deps-apt.sh
311+
- name: Set up GCC-10 for ASAN
312+
uses: egor-tensin/setup-gcc@v1
313+
with:
314+
version: 10
302315
- name: Configure OpenSSL env vars
303316
run: |
304317
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV

Diff for: .github/workflows/build_msi.yml

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
build:
2727
name: Windows Installer
2828
runs-on: windows-latest
29+
timeout-minutes: 60
2930
strategy:
3031
matrix:
3132
type: [x86, x64, arm64]

Diff for: .github/workflows/doc.yml

+47
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
build_doc:
3737
name: 'Docs'
3838
runs-on: ubuntu-latest
39+
timeout-minutes: 60
3940
steps:
4041
- uses: actions/checkout@v3
4142
- name: Register Sphinx problem matcher
@@ -53,10 +54,56 @@ jobs:
5354
- name: 'Build HTML documentation'
5455
run: make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html
5556

57+
# Add pull request annotations for Sphinx nitpicks (missing references)
58+
- name: 'Get list of changed files'
59+
if: github.event_name == 'pull_request'
60+
id: changed_files
61+
uses: Ana06/[email protected]
62+
with:
63+
filter: "Doc/**"
64+
- name: 'Build changed files in nit-picky mode'
65+
if: github.event_name == 'pull_request'
66+
continue-on-error: true
67+
run: |
68+
# Mark files the pull request modified
69+
touch ${{ steps.changed_files.outputs.added_modified }}
70+
# Build docs with the '-n' (nit-picky) option; convert warnings to annotations
71+
make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n --keep-going" html 2>&1 |
72+
python Doc/tools/warnings-to-gh-actions.py
73+
74+
# Ensure some files always pass Sphinx nit-picky mode (no missing references)
75+
- name: 'Build known-good files in nit-picky mode'
76+
run: |
77+
# Mark files that must pass nit-picky
78+
python Doc/tools/touch-clean-files.py
79+
# Build docs with the '-n' (nit-picky) option, convert warnings to errors (-W)
80+
make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n -W --keep-going" html 2>&1
81+
82+
# This build doesn't use problem matchers or check annotations
83+
# It also does not run 'make check', as sphinx-lint is not installed into the
84+
# environment.
85+
build_doc_oldest_supported_sphinx:
86+
name: 'Docs (Oldest Sphinx)'
87+
runs-on: ubuntu-latest
88+
timeout-minutes: 60
89+
steps:
90+
- uses: actions/checkout@v3
91+
- name: 'Set up Python'
92+
uses: actions/setup-python@v4
93+
with:
94+
python-version: '3.11' # known to work with Sphinx 3.2
95+
cache: 'pip'
96+
cache-dependency-path: 'Doc/requirements-oldest-sphinx.txt'
97+
- name: 'Install build dependencies'
98+
run: make -C Doc/ venv REQUIREMENTS="requirements-oldest-sphinx.txt"
99+
- name: 'Build HTML documentation'
100+
run: make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html
101+
56102
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
57103
doctest:
58104
name: 'Doctest'
59105
runs-on: ubuntu-latest
106+
timeout-minutes: 60
60107
steps:
61108
- uses: actions/checkout@v3
62109
- name: Register Sphinx problem matcher

Diff for: .github/workflows/documentation-links.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Read the Docs PR preview
2+
# Automatically edits a pull request's descriptions with a link
3+
# to the documentation's preview on Read the Docs.
4+
5+
on:
6+
pull_request_target:
7+
types:
8+
- opened
9+
paths:
10+
- 'Doc/**'
11+
- '.github/workflows/doc.yml'
12+
13+
permissions:
14+
pull-requests: write
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
documentation-links:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: readthedocs/actions/preview@v1
25+
with:
26+
project-slug: "cpython-previews"
27+
single-version: "true"

Diff for: .github/workflows/new-bugs-announce-notifier.yml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ permissions:
1111
jobs:
1212
notify-new-bugs-announce:
1313
runs-on: ubuntu-latest
14+
timeout-minutes: 10
1415
steps:
1516
- uses: actions/setup-node@v3
1617
with:

Diff for: .github/workflows/project-updater.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@ jobs:
1313
add-to-project:
1414
name: Add issues to projects
1515
runs-on: ubuntu-latest
16+
timeout-minutes: 10
1617
strategy:
1718
matrix:
1819
include:
1920
# if an issue has any of these labels, it will be added
2021
# to the corresponding project
2122
- { project: 2, label: "release-blocker, deferred-blocker" }
22-
- { project: 3, label: expert-subinterpreters }
23-
- { project: 29, label: expert-asyncio }
2423
- { project: 32, label: sprint }
25-
24+
2625
steps:
2726
- uses: actions/[email protected]
2827
with:

0 commit comments

Comments
 (0)