forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 0
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 cached_property_docs
* main: (760 commits) pythonGH-104102: Optimize `pathlib.Path.glob()` handling of `../` pattern segments (pythonGH-104103) pythonGH-104104: Optimize `pathlib.Path.glob()` by avoiding repeated calls to `os.path.normcase()` (pythonGH-104105) pythongh-103822: [Calendar] change return value to enum for day and month APIs (pythonGH-103827) pythongh-65022: Fix description of tuple return value in copyreg (python#103892) pythonGH-103525: Improve exception message from `pathlib.PurePath()` (pythonGH-103526) pythongh-84436: Add integration C API tests for immortal objects (pythongh-103962) pythongh-103743: Add PyUnstable_Object_GC_NewWithExtraData (pythonGH-103744) pythongh-102997: Update Windows installer to SQLite 3.41.2. (python#102999) pythonGH-103484: Fix redirected permanently URLs (python#104001) Improve assert_type phrasing (python#104081) pythongh-102997: Update macOS installer to SQLite 3.41.2. (pythonGH-102998) pythonGH-103472: close response in HTTPConnection._tunnel (python#103473) pythongh-88496: IDLE - fix another test on macOS (python#104075) pythongh-94673: Hide Objects in PyTypeObject Behind Accessors (pythongh-104074) pythongh-94673: Properly Initialize and Finalize Static Builtin Types for Each Interpreter (pythongh-104072) pythongh-104016: Skip test for deeply neste f-strings on wasi (python#104071) pythongh-104057: Fix direct invocation of test_super (python#104064) pythongh-87092: Expose assembler to unit tests (python#103988) pythongh-97696: asyncio eager tasks factory (python#102853) pythongh-84436: Immortalize in _PyStructSequence_InitBuiltinWithFlags() (pythongh-104054) ...
- Loading branch information
Showing
1,103 changed files
with
63,415 additions
and
33,081 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 --setopt=install_weak_deps=False install /usr/bin/{blurb,clang,curl,git,ln,tar,xz} 'dnf-command(builddep)' && \ | ||
dnf -y --nodocs --setopt=install_weak_deps=False 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,81 @@ | ||
{ | ||
"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.compilerPath": "/usr/bin/clang", | ||
"C_Cpp.default.cStandard": "c11", | ||
"C_Cpp.default.defines": [ | ||
"CONFIG_64", | ||
"Py_BUILD_CORE" | ||
], | ||
"C_Cpp.default.includePath": [ | ||
"${workspaceFolder}/*", | ||
"${workspaceFolder}/Include/**" | ||
], | ||
// 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
Validating CODEOWNERS rules …
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ jobs: | |
check_source: | ||
name: 'Check for source changes' | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
outputs: | ||
run_tests: ${{ steps.check.outputs.run_tests }} | ||
steps: | ||
|
@@ -63,6 +64,7 @@ jobs: | |
check_generated_files: | ||
name: 'Check if generated files are up to date' | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
needs: check_source | ||
if: needs.check_source.outputs.run_tests == 'true' | ||
steps: | ||
|
@@ -111,10 +113,14 @@ 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)' | ||
runs-on: windows-latest | ||
timeout-minutes: 60 | ||
needs: check_source | ||
if: needs.check_source.outputs.run_tests == 'true' | ||
env: | ||
|
@@ -123,7 +129,6 @@ jobs: | |
- uses: actions/checkout@v3 | ||
- name: Build CPython | ||
run: .\PCbuild\build.bat -e -d -p Win32 | ||
timeout-minutes: 30 | ||
- name: Display build info | ||
run: .\python.bat -m test.pythoninfo | ||
- name: Tests | ||
|
@@ -132,6 +137,7 @@ jobs: | |
build_win_amd64: | ||
name: 'Windows (x64)' | ||
runs-on: windows-latest | ||
timeout-minutes: 60 | ||
needs: check_source | ||
if: needs.check_source.outputs.run_tests == 'true' | ||
env: | ||
|
@@ -142,7 +148,6 @@ jobs: | |
run: echo "::add-matcher::.github/problem-matchers/msvc.json" | ||
- name: Build CPython | ||
run: .\PCbuild\build.bat -e -d -p x64 | ||
timeout-minutes: 30 | ||
- name: Display build info | ||
run: .\python.bat -m test.pythoninfo | ||
- name: Tests | ||
|
@@ -151,18 +156,27 @@ jobs: | |
build_macos: | ||
name: 'macOS' | ||
runs-on: macos-latest | ||
timeout-minutes: 60 | ||
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: Prepare homebrew environment variables | ||
run: | | ||
echo "LDFLAGS=-L$(brew --prefix tcl-tk)/lib" >> $GITHUB_ENV | ||
echo "PKG_CONFIG_PATH=$(brew --prefix [email protected])/lib/pkgconfig:$(brew --prefix tcl-tk)/lib/pkgconfig" >> $GITHUB_ENV | ||
- name: Install Homebrew dependencies | ||
run: brew install pkg-config [email protected] xz gdbm tcl-tk | ||
- name: Configure CPython | ||
run: ./configure --with-pydebug --prefix=/opt/python-dev | ||
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 \ | ||
--with-openssl="$(brew --prefix [email protected])" | ||
- name: Build CPython | ||
run: make -j4 | ||
- name: Display build info | ||
|
@@ -173,6 +187,7 @@ jobs: | |
build_ubuntu: | ||
name: 'Ubuntu' | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 60 | ||
needs: check_source | ||
if: needs.check_source.outputs.run_tests == 'true' | ||
env: | ||
|
@@ -230,6 +245,7 @@ jobs: | |
build_ubuntu_ssltests: | ||
name: 'Ubuntu SSL tests with OpenSSL' | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 60 | ||
needs: check_source | ||
if: needs.check_source.outputs.run_tests == 'true' | ||
strategy: | ||
|
@@ -279,6 +295,7 @@ jobs: | |
build_asan: | ||
name: 'Address sanitizer' | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 60 | ||
needs: check_source | ||
if: needs.check_source.outputs.run_tests == 'true' | ||
env: | ||
|
@@ -291,6 +308,10 @@ jobs: | |
run: echo "::add-matcher::.github/problem-matchers/gcc.json" | ||
- name: Install Dependencies | ||
run: sudo ./.github/workflows/posix-deps-apt.sh | ||
- name: Set up GCC-10 for ASAN | ||
uses: egor-tensin/setup-gcc@v1 | ||
with: | ||
version: 10 | ||
- name: Configure OpenSSL env vars | ||
run: | | ||
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ jobs: | |
build_doc: | ||
name: 'Docs' | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Register Sphinx problem matcher | ||
|
@@ -53,10 +54,56 @@ 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' | ||
if: github.event_name == 'pull_request' | ||
id: changed_files | ||
uses: Ana06/[email protected] | ||
with: | ||
filter: "Doc/**" | ||
- name: 'Build changed files in nit-picky mode' | ||
if: github.event_name == 'pull_request' | ||
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 | ||
# This build doesn't use problem matchers or check annotations | ||
# It also does not run 'make check', as sphinx-lint is not installed into the | ||
# environment. | ||
build_doc_oldest_supported_sphinx: | ||
name: 'Docs (Oldest Sphinx)' | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: 'Set up Python' | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' # known to work with Sphinx 3.2 | ||
cache: 'pip' | ||
cache-dependency-path: 'Doc/requirements-oldest-sphinx.txt' | ||
- name: 'Install build dependencies' | ||
run: make -C Doc/ venv REQUIREMENTS="requirements-oldest-sphinx.txt" | ||
- name: 'Build HTML documentation' | ||
run: make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html | ||
|
||
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release | ||
doctest: | ||
name: 'Doctest' | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Register Sphinx problem matcher | ||
|
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,27 @@ | ||
name: Read the Docs PR preview | ||
# Automatically edits a pull request's descriptions with a link | ||
# to the documentation's preview on Read the Docs. | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
paths: | ||
- 'Doc/**' | ||
- '.github/workflows/doc.yml' | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
documentation-links: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: readthedocs/actions/preview@v1 | ||
with: | ||
project-slug: "cpython-previews" | ||
single-version: "true" |
Oops, something went wrong.