Skip to content

Commit ef6f4c3

Browse files
committed
Merge branch 'main' into pythongh-100479-add-makepath
2 parents 4759d01 + 24facd6 commit ef6f4c3

File tree

977 files changed

+54571
-28103
lines changed

Some content is hidden

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

977 files changed

+54571
-28103
lines changed

.azure-pipelines/ci.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
displayName: Pre-build checks
99

1010
pool:
11-
vmImage: ubuntu-20.04
11+
vmImage: ubuntu-22.04
1212

1313
steps:
1414
- template: ./prebuild-checks.yml
@@ -20,7 +20,7 @@ jobs:
2020
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true'))
2121

2222
pool:
23-
vmImage: ubuntu-20.04
23+
vmImage: ubuntu-22.04
2424

2525
steps:
2626
- template: ./docs-steps.yml
@@ -52,12 +52,12 @@ jobs:
5252
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
5353

5454
pool:
55-
vmImage: ubuntu-20.04
55+
vmImage: ubuntu-22.04
5656

5757
variables:
5858
testRunTitle: '$(build.sourceBranchName)-linux'
5959
testRunPlatform: linux
60-
openssl_version: 1.1.1q
60+
openssl_version: 1.1.1t
6161

6262
steps:
6363
- template: ./posix-steps.yml
@@ -78,12 +78,12 @@ jobs:
7878
)
7979
8080
pool:
81-
vmImage: ubuntu-20.04
81+
vmImage: ubuntu-22.04
8282

8383
variables:
8484
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
8585
testRunPlatform: linux-coverage
86-
openssl_version: 1.1.1q
86+
openssl_version: 1.1.1t
8787

8888
steps:
8989
- template: ./posix-steps.yml

.azure-pipelines/pr.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
displayName: Pre-build checks
99

1010
pool:
11-
vmImage: ubuntu-20.04
11+
vmImage: ubuntu-22.04
1212

1313
steps:
1414
- template: ./prebuild-checks.yml
@@ -20,7 +20,7 @@ jobs:
2020
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true'))
2121

2222
pool:
23-
vmImage: ubuntu-20.04
23+
vmImage: ubuntu-22.04
2424

2525
steps:
2626
- template: ./docs-steps.yml
@@ -52,12 +52,12 @@ jobs:
5252
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
5353

5454
pool:
55-
vmImage: ubuntu-20.04
55+
vmImage: ubuntu-22.04
5656

5757
variables:
5858
testRunTitle: '$(system.pullRequest.TargetBranch)-linux'
5959
testRunPlatform: linux
60-
openssl_version: 1.1.1q
60+
openssl_version: 1.1.1t
6161

6262
steps:
6363
- template: ./posix-steps.yml
@@ -78,12 +78,12 @@ jobs:
7878
)
7979
8080
pool:
81-
vmImage: ubuntu-20.04
81+
vmImage: ubuntu-22.04
8282

8383
variables:
8484
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
8585
testRunPlatform: linux-coverage
86-
openssl_version: 1.1.1q
86+
openssl_version: 1.1.1t
8787

8888
steps:
8989
- template: ./posix-steps.yml

.azure-pipelines/windows-layout-steps.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ steps:
1212
displayName: Show layout info (${{ parameters.kind }})
1313

1414
- ${{ if eq(parameters.fulltest, 'true') }}:
15-
- script: .\python.exe -m test -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 --junit-xml="$(Build.BinariesDirectory)\test-results-${{ parameters.kind }}.xml" --tempdir "$(Build.BinariesDirectory)\tmp-${{ parameters.kind }}-$(arch)"
15+
- script: .\python.exe -m test -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 --junit-xml="$(Build.BinariesDirectory)\test-results-${{ parameters.kind }}.xml" --tempdir "$(Build.BinariesDirectory)\tmp-${{ parameters.kind }}-$(arch)" -i test_launcher
1616
workingDirectory: $(Build.BinariesDirectory)\layout-${{ parameters.kind }}-$(arch)
1717
displayName: ${{ parameters.kind }} Tests
1818
env:

.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 install git clang xz python3-blurb dnf-plugins-core && \
13+
dnf -y --nodocs 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

.devcontainer/devcontainer.json

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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.cStandard": "c11",
41+
"C_Cpp.default.defines": [
42+
"Py_BUILD_CORE"
43+
],
44+
// https://github.com/microsoft/vscode-cpptools/issues/10732
45+
"C_Cpp.errorSquiggles": "disabled",
46+
"editor.insertSpaces": true,
47+
"editor.rulers": [
48+
80
49+
],
50+
"editor.tabSize": 4,
51+
"editor.trimAutoWhitespace": true,
52+
"files.associations": {
53+
"*.h": "c"
54+
},
55+
"files.encoding": "utf8",
56+
"files.eol": "\n",
57+
"files.insertFinalNewline": true,
58+
"files.trimTrailingWhitespace": true,
59+
"python.analysis.diagnosticSeverityOverrides": {
60+
// Complains about shadowing the stdlib w/ the stdlib.
61+
"reportShadowedImports": "none",
62+
// Doesn't like _frozen_importlib.
63+
"reportMissingImports": "none"
64+
},
65+
"python.analysis.extraPaths": [
66+
"Lib"
67+
],
68+
"python.defaultInterpreterPath": "./python",
69+
"[restructuredtext]": {
70+
"editor.tabSize": 3
71+
}
72+
}
73+
}
74+
}
75+
}

.github/CODEOWNERS

+9-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
# GitHub
88
.github/** @ezio-melotti
99

10+
# Build system
11+
configure* @erlend-aasland @corona10
12+
1013
# asyncio
1114
**/*asyncio* @1st1 @asvetlov @gvanrossum @kumaraditya303
1215

@@ -144,13 +147,18 @@ Lib/ast.py @isidentical
144147
**/*cgi* @ethanfurman
145148
**/*tarfile* @ethanfurman
146149

147-
**/*tomllib* @encukou
150+
**/*tomllib* @encukou @hauntsaninja
148151

149152
**/*sysconfig* @FFY00
150153

154+
**/*cjkcodecs* @corona10
155+
151156
# macOS
152157
/Mac/ @python/macos-team
153158
**/*osx_support* @python/macos-team
154159

160+
# pathlib
161+
**/*pathlib* @barneygale
162+
155163
# zipfile.Path
156164
**/*zipfile/*_path.py @jaraco

.github/workflows/build.yml

+19-8
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ jobs:
111111
run: make smelly
112112
- name: Check limited ABI symbols
113113
run: make check-limited-abi
114+
- name: Check for unsupported C global variables
115+
if: github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
116+
run: make check-c-globals
114117

115118
build_win32:
116119
name: 'Windows (x86)'
@@ -154,15 +157,23 @@ jobs:
154157
needs: check_source
155158
if: needs.check_source.outputs.run_tests == 'true'
156159
env:
160+
HOMEBREW_NO_ANALYTICS: 1
161+
HOMEBREW_NO_AUTO_UPDATE: 1
162+
HOMEBREW_NO_INSTALL_CLEANUP: 1
157163
PYTHONSTRICTEXTENSIONBUILD: 1
158164
steps:
159165
- uses: actions/checkout@v3
160-
- name: Prepare homebrew environment variables
161-
run: |
162-
echo "LDFLAGS=-L$(brew --prefix tcl-tk)/lib" >> $GITHUB_ENV
163-
echo "PKG_CONFIG_PATH=$(brew --prefix openssl@1.1)/lib/pkgconfig:$(brew --prefix tcl-tk)/lib/pkgconfig" >> $GITHUB_ENV
166+
- name: Install Homebrew dependencies
167+
run: brew install pkg-config openssl@1.1 xz gdbm tcl-tk
164168
- name: Configure CPython
165-
run: ./configure --with-pydebug --prefix=/opt/python-dev
169+
run: |
170+
CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \
171+
LDFLAGS="-L$(brew --prefix gdbm)/lib -I$(brew --prefix xz)/lib" \
172+
PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \
173+
./configure \
174+
--with-pydebug \
175+
--prefix=/opt/python-dev \
176+
--with-openssl="$(brew --prefix openssl@1.1)"
166177
- name: Build CPython
167178
run: make -j4
168179
- name: Display build info
@@ -176,7 +187,7 @@ jobs:
176187
needs: check_source
177188
if: needs.check_source.outputs.run_tests == 'true'
178189
env:
179-
OPENSSL_VER: 1.1.1s
190+
OPENSSL_VER: 1.1.1t
180191
PYTHONSTRICTEXTENSIONBUILD: 1
181192
steps:
182193
- uses: actions/checkout@v3
@@ -235,7 +246,7 @@ jobs:
235246
strategy:
236247
fail-fast: false
237248
matrix:
238-
openssl_ver: [1.1.1s, 3.0.7, 3.1.0-beta1]
249+
openssl_ver: [1.1.1t, 3.0.8, 3.1.0-beta1]
239250
env:
240251
OPENSSL_VER: ${{ matrix.openssl_ver }}
241252
MULTISSL_DIR: ${{ github.workspace }}/multissl
@@ -282,7 +293,7 @@ jobs:
282293
needs: check_source
283294
if: needs.check_source.outputs.run_tests == 'true'
284295
env:
285-
OPENSSL_VER: 1.1.1s
296+
OPENSSL_VER: 1.1.1t
286297
PYTHONSTRICTEXTENSIONBUILD: 1
287298
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
288299
steps:

.github/workflows/doc.yml

+23
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,29 @@ jobs:
5353
- name: 'Build HTML documentation'
5454
run: make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html
5555

56+
# Add pull request annotations for Sphinx nitpicks (missing references)
57+
- name: 'Get list of changed files'
58+
id: changed_files
59+
uses: Ana06/get-changed-files@v2.2.0
60+
with:
61+
filter: "Doc/**"
62+
- name: 'Build changed files in nit-picky mode'
63+
continue-on-error: true
64+
run: |
65+
# Mark files the pull request modified
66+
touch ${{ steps.changed_files.outputs.added_modified }}
67+
# Build docs with the '-n' (nit-picky) option; convert warnings to annotations
68+
make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n --keep-going" html 2>&1 |
69+
python Doc/tools/warnings-to-gh-actions.py
70+
71+
# Ensure some files always pass Sphinx nit-picky mode (no missing references)
72+
- name: 'Build known-good files in nit-picky mode'
73+
run: |
74+
# Mark files that must pass nit-picky
75+
python Doc/tools/touch-clean-files.py
76+
# Build docs with the '-n' (nit-picky) option, convert warnings to errors (-W)
77+
make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n -W --keep-going" html 2>&1
78+
5679
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
5780
doctest:
5881
name: 'Doctest'

.github/workflows/new-bugs-announce-notifier.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ jobs:
1919
- name: Send notification
2020
uses: actions/github-script@v6
2121
env:
22-
MAILGUN_API_KEY: ${{ secrets.PSF_MAILGUN_KEY }}
22+
MAILGUN_API_KEY: ${{ secrets.MAILGUN_PYTHON_ORG_MAILGUN_KEY }}
2323
with:
2424
script: |
2525
const Mailgun = require("mailgun.js");
2626
const formData = require('form-data');
2727
const mailgun = new Mailgun(formData);
28-
const DOMAIN = "mg.python.org";
28+
const DOMAIN = "mailgun.python.org";
2929
const mg = mailgun.client({username: 'api', key: process.env.MAILGUN_API_KEY});
3030
github.rest.issues.get({
3131
issue_number: context.issue.number,
@@ -44,7 +44,7 @@ jobs:
4444
};
4545
4646
const data = {
47-
from: "CPython Issues <github@mg.python.org>",
47+
from: "CPython Issues <github@mailgun.python.org>",
4848
to: "new-bugs-announce@python.org",
4949
subject: `[Issue ${issue.data.number}] ${issue.data.title}`,
5050
template: "new-github-issue",

Doc/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ VENVDIR = ./venv
99
SPHINXBUILD = PATH=$(VENVDIR)/bin:$$PATH sphinx-build
1010
SPHINXLINT = PATH=$(VENVDIR)/bin:$$PATH sphinx-lint
1111
BLURB = PATH=$(VENVDIR)/bin:$$PATH blurb
12+
JOBS = auto
1213
PAPER =
1314
SOURCES =
1415
DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py)
@@ -18,7 +19,7 @@ SPHINXERRORHANDLING = -W
1819
PAPEROPT_a4 = -D latex_elements.papersize=a4paper
1920
PAPEROPT_letter = -D latex_elements.papersize=letterpaper
2021

21-
ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees $(PAPEROPT_$(PAPER)) -j auto \
22+
ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees $(PAPEROPT_$(PAPER)) -j $(JOBS) \
2223
$(SPHINXOPTS) $(SPHINXERRORHANDLING) . build/$(BUILDER) $(SOURCES)
2324

2425
.PHONY: help

Doc/bugs.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ If you find a bug in this documentation or would like to propose an improvement,
1919
please submit a bug report on the :ref:`tracker <using-the-tracker>`. If you
2020
have a suggestion on how to fix it, include that as well.
2121

22+
You can also open a discussion item on our
23+
`Documentation Discourse forum <https://discuss.python.org/c/documentation/26>`_.
24+
2225
If you're short on time, you can also email documentation bug reports to
2326
docs@python.org (behavioral bugs can be sent to python-list@python.org).
2427
'docs@' is a mailing list run by volunteers; your request will be noticed,
@@ -67,7 +70,7 @@ Click on the "New issue" button in the top bar to report a new issue.
6770
The submission form has two fields, "Title" and "Comment".
6871

6972
For the "Title" field, enter a *very* short description of the problem;
70-
less than ten words is good.
73+
fewer than ten words is good.
7174

7275
In the "Comment" field, describe the problem in detail, including what you
7376
expected to happen and what did happen. Be sure to include whether any

0 commit comments

Comments
 (0)