forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into pythongh-73435-pathlib-match-recursive
- Loading branch information
Showing
677 changed files
with
25,190 additions
and
12,779 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM docker.io/library/fedora:37 | ||
|
||
ENV CC=clang | ||
|
||
ENV WASI_SDK_VERSION=19 | ||
ENV WASI_SDK_PATH=/opt/wasi-sdk | ||
|
||
ENV WASMTIME_HOME=/opt/wasmtime | ||
ENV WASMTIME_VERSION=7.0.0 | ||
ENV WASMTIME_CPU_ARCH=x86_64 | ||
|
||
RUN dnf -y --nodocs install git clang xz python3-blurb dnf-plugins-core && \ | ||
dnf -y --nodocs builddep python3 && \ | ||
dnf -y clean all | ||
|
||
RUN mkdir ${WASI_SDK_PATH} && \ | ||
curl --location https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-linux.tar.gz | \ | ||
tar --strip-components 1 --directory ${WASI_SDK_PATH} --extract --gunzip | ||
|
||
RUN mkdir --parents ${WASMTIME_HOME} && \ | ||
curl --location "https://github.com/bytecodealliance/wasmtime/releases/download/v${WASMTIME_VERSION}/wasmtime-v${WASMTIME_VERSION}-${WASMTIME_CPU_ARCH}-linux.tar.xz" | \ | ||
xz --decompress | \ | ||
tar --strip-components 1 --directory ${WASMTIME_HOME} -x && \ | ||
ln -s ${WASMTIME_HOME}/wasmtime /usr/local/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
{ | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"onCreateCommand": [ | ||
// Install common tooling. | ||
"dnf", | ||
"install", | ||
"-y", | ||
"which", | ||
"zsh", | ||
"fish" | ||
], | ||
"updateContentCommand": { | ||
// Using the shell for `nproc` usage. | ||
"python": "./configure --config-cache --with-pydebug && make -s -j `nproc`", | ||
"docs": [ | ||
"make", | ||
"--directory", | ||
"Doc", | ||
"venv", | ||
"html" | ||
] | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
// Highlighting for Parser/Python.asdl. | ||
"brettcannon.zephyr-asdl", | ||
// Highlighting for configure.ac. | ||
"maelvalais.autoconf", | ||
// C auto-complete. | ||
"ms-vscode.cpptools", | ||
// To view built docs. | ||
"ms-vscode.live-server" | ||
// https://github.com/microsoft/vscode-python/issues/18073 | ||
// "ms-python.python" | ||
], | ||
"settings": { | ||
"C_Cpp.default.cStandard": "c11", | ||
"C_Cpp.default.defines": [ | ||
"Py_BUILD_CORE" | ||
], | ||
// https://github.com/microsoft/vscode-cpptools/issues/10732 | ||
"C_Cpp.errorSquiggles": "disabled", | ||
"editor.insertSpaces": true, | ||
"editor.rulers": [ | ||
80 | ||
], | ||
"editor.tabSize": 4, | ||
"editor.trimAutoWhitespace": true, | ||
"files.associations": { | ||
"*.h": "c" | ||
}, | ||
"files.encoding": "utf8", | ||
"files.eol": "\n", | ||
"files.insertFinalNewline": true, | ||
"files.trimTrailingWhitespace": true, | ||
"python.analysis.diagnosticSeverityOverrides": { | ||
// Complains about shadowing the stdlib w/ the stdlib. | ||
"reportShadowedImports": "none", | ||
// Doesn't like _frozen_importlib. | ||
"reportMissingImports": "none" | ||
}, | ||
"python.analysis.extraPaths": [ | ||
"Lib" | ||
], | ||
"python.defaultInterpreterPath": "./python", | ||
"[restructuredtext]": { | ||
"editor.tabSize": 3 | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,6 +111,9 @@ jobs: | |
run: make smelly | ||
- name: Check limited ABI symbols | ||
run: make check-limited-abi | ||
- name: Check for unsupported C global variables | ||
if: github.event_name == 'pull_request' # $GITHUB_EVENT_NAME | ||
run: make check-c-globals | ||
|
||
build_win32: | ||
name: 'Windows (x86)' | ||
|
@@ -154,18 +157,19 @@ jobs: | |
needs: check_source | ||
if: needs.check_source.outputs.run_tests == 'true' | ||
env: | ||
HOMEBREW_NO_ANALYTICS: 1 | ||
HOMEBREW_NO_AUTO_UPDATE: 1 | ||
HOMEBREW_NO_INSTALL_CLEANUP: 1 | ||
PYTHONSTRICTEXTENSIONBUILD: 1 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Homebrew dependencies | ||
run: brew install pkg-config [email protected] xz gdbm tcl-tk | ||
- name: Prepare Homebrew environment variables | ||
run: | | ||
echo "CFLAGS=-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" >> $GITHUB_ENV | ||
echo "LDFLAGS=-L$(brew --prefix gdbm)/lib -I$(brew --prefix xz)/lib" >> $GITHUB_ENV | ||
echo "PKG_CONFIG_PATH=$(brew --prefix [email protected])/lib/pkgconfig:$(brew --prefix tcl-tk)/lib/pkgconfig" >> $GITHUB_ENV | ||
- name: Configure CPython | ||
run: | | ||
CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \ | ||
LDFLAGS="-L$(brew --prefix gdbm)/lib -I$(brew --prefix xz)/lib" \ | ||
PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \ | ||
./configure \ | ||
--with-pydebug \ | ||
--prefix=/opt/python-dev \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,29 @@ jobs: | |
- name: 'Build HTML documentation' | ||
run: make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html | ||
|
||
# Add pull request annotations for Sphinx nitpicks (missing references) | ||
- name: 'Get list of changed files' | ||
id: changed_files | ||
uses: Ana06/[email protected] | ||
with: | ||
filter: "Doc/**" | ||
- name: 'Build changed files in nit-picky mode' | ||
continue-on-error: true | ||
run: | | ||
# Mark files the pull request modified | ||
touch ${{ steps.changed_files.outputs.added_modified }} | ||
# Build docs with the '-n' (nit-picky) option; convert warnings to annotations | ||
make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n --keep-going" html 2>&1 | | ||
python Doc/tools/warnings-to-gh-actions.py | ||
# Ensure some files always pass Sphinx nit-picky mode (no missing references) | ||
- name: 'Build known-good files in nit-picky mode' | ||
run: | | ||
# Mark files that must pass nit-picky | ||
python Doc/tools/touch-clean-files.py | ||
# Build docs with the '-n' (nit-picky) option, convert warnings to errors (-W) | ||
make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n -W --keep-going" html 2>&1 | ||
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release | ||
doctest: | ||
name: 'Doctest' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,13 +19,13 @@ jobs: | |
- name: Send notification | ||
uses: actions/github-script@v6 | ||
env: | ||
MAILGUN_API_KEY: ${{ secrets.PSF_MAILGUN_KEY }} | ||
MAILGUN_API_KEY: ${{ secrets.MAILGUN_PYTHON_ORG_MAILGUN_KEY }} | ||
with: | ||
script: | | ||
const Mailgun = require("mailgun.js"); | ||
const formData = require('form-data'); | ||
const mailgun = new Mailgun(formData); | ||
const DOMAIN = "mg.python.org"; | ||
const DOMAIN = "mailgun.python.org"; | ||
const mg = mailgun.client({username: 'api', key: process.env.MAILGUN_API_KEY}); | ||
github.rest.issues.get({ | ||
issue_number: context.issue.number, | ||
|
@@ -44,7 +44,7 @@ jobs: | |
}; | ||
const data = { | ||
from: "CPython Issues <github@mg.python.org>", | ||
from: "CPython Issues <github@mailgun.python.org>", | ||
to: "[email protected]", | ||
subject: `[Issue ${issue.data.number}] ${issue.data.title}`, | ||
template: "new-github-issue", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.