Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b3cd2e1
Preserve final Python 3.15 integration tree for main replay
youknowdot Oct 19, 2026
eb08f9c
Preserve native errors through ctypes teardown callbacks
youknowdot Oct 19, 2026
63b299f
Restore finite-EOF profiler table bounds
youknowdot Oct 24, 2026
97b505c
Remove confirmed duplicate upgrade tests
youknowdot Oct 24, 2026
44cb134
Preserve pending signal wakeup errors across fork
youknowdot Oct 24, 2026
4ae4d2f
Merge main and preserve symtable warning filenames
youknowdot Oct 24, 2026
d688e74
Preserve main isolation checks and drop redundant alias qualification
youknowdot Oct 25, 2026
25b4619
Merge main and preserve landed Python 3.15 fixes
youknowdot Oct 25, 2026
1cfc151
Merge main and preserve limited-stack test guard
youknowdot Oct 25, 2026
948f90b
test: remove duplicate codegen folding assertions
youknowdot Oct 25, 2026
bb64711
Remove unsafe foreign-thread local cleanup from integration
youknowdot Oct 25, 2026
a0869e2
Remove newly added Python-behavior tests from C API Rust modules
youknowdot Oct 25, 2026
2a0f694
Prune equivalent upgrade refactors and the Rust Python-test wrapper
youknowdot Oct 26, 2026
507bfe1
Merge current main into Python 3.15 integration
youknowdot Oct 26, 2026
0467375
Remove new Python-source oracle tests from Rust codegen tests
youknowdot Oct 26, 2026
1200fc3
Merge current main and preserve thread diagnostic strings
youknowdot Oct 26, 2026
5fdb989
Clean up updater helper targets and refresh C API exports
youknowdot Oct 26, 2026
3ba5d1a
Merge current main compiler and ctypes fixes
youknowdot Oct 26, 2026
0706c9b
Merge main updater cleanup into Python 3.15 integration
youknowdot Oct 26, 2026
1880d09
Reconcile landed Python 3.15 fixes and remove duplicate lazy-import c…
codex Oct 27, 2026
4914518
Reconcile landed XML and remove unused mega scaffolding
youknowdot Oct 27, 2026
cc9f601
Remove unused CPython ASDL assets from the mega branch
youknowdot Oct 27, 2026
dfdd8a5
Keep cross-interpreter fixture modes out of the production API
youknowdot Oct 27, 2026
cbb1ce4
Drop nonessential codegen and VM refactor differences
youknowdot Oct 28, 2026
720ca78
Merge landed cross-interpreter support without duplicate imports
youknowdot Oct 28, 2026
586d7ec
Merge landed Python 3.15 runtime and library updates into mega
codex Oct 28, 2026
93f38e8
Merge landed Python 3.15 native library updates into mega
codex Oct 28, 2026
ac6fbcf
Merge landed site and UTF-8 startup updates into mega
codex Oct 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .cspell.dict/cpython.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ prec
preds
preinitialized
pybuilddir
pycfunction
pycore
PYGC
pyinner
Expand Down Expand Up @@ -311,3 +312,4 @@ xibufferview
xstat
XXPRIME
ENOTCAPABLE
unmarshalled
1 change: 1 addition & 0 deletions .cspell.dict/python-more.txt
Original file line number Diff line number Diff line change
Expand Up @@ -306,3 +306,4 @@ xmlcharrefreplace
xoptions
xopts
yieldfrom
issubnormal
2 changes: 2 additions & 0 deletions .cspell.dict/rustpython.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ rustix
struc
unscanned
zelf
embedders
nocapture
87 changes: 76 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -581,30 +581,57 @@

- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0

- name: Verify the CPython reference environment
run: python -c "import bz2, ctypes, lzma, pathlib, platform, sqlite3, ssl; expected = pathlib.Path('.python-version').read_text().strip(); actual = platform.python_version(); assert actual == expected, (actual, expected)"

- name: Install macOS dependencies
uses: ./.github/actions/install-macos-deps
with:
openssl: true

# Keep features in sync with update-caches.yml CARGO_ARGS.
- name: build rustpython
run: cargo build --locked --release --verbose --features=threading,jit ${{ env.CARGO_ARGS }}

- name: run snippets
run: python -m pip install -r requirements.txt && pytest -v
working-directory: ./extra_tests

- name: Detect available cores
id: cores
shell: bash
run: |
cores=$(python -c 'print(__import__("os").process_cpu_count())')
echo "cores=${cores}" >> "$GITHUB_OUTPUT"

- name: Run CPython tests
- name: Build production RustPython
id: build_default
run: cargo build --locked --release --verbose --features=threading,jit ${{ env.CARGO_ARGS }}

- name: Record Windows timestamp compatibility
if: runner.os == 'Windows'
shell: bash
run: |
python - <<'PYTIME'
import json, subprocess, sys
code = """
import datetime, json, time
rows = []
for timestamp in (-1, -2147483649, -11644473600, -11644473601, 2**40):
for name in ('localtime', 'gmtime'):
try:
value = getattr(time, name)(timestamp)
result = [list(value), value.tm_zone, value.tm_gmtoff]
except Exception as error:
result = [type(error).__name__, str(error), getattr(error, 'errno', None)]
rows.append([timestamp, name, result])
print(json.dumps(rows))
"""
for executable in (sys.executable, 'target/release/rustpython.exe'):
result = subprocess.check_output([executable, '-c', code], text=True)
print(json.dumps({'executable': executable, 'timestamps': json.loads(result)}))
PYTIME

- name: run snippets
run: python -m pip install -r requirements.txt && python -m pytest -v
working-directory: ./extra_tests

- name: Run CPython tests (production)
run: |
# shellcheck disable=SC2086
target/release/rustpython -u -m test --slow-ci -j "$CORES" $EXTRA_TEST_ARGS $SKIPS
target/release/rustpython -u -m test --slow-ci -j "$CORES" $EXTRA_TEST_ARGS $SKIPS -x test_frame test_inspect test_monitoring
timeout-minutes: ${{ matrix.timeout }}
shell: bash
env:
Expand Down Expand Up @@ -677,6 +704,28 @@
shell: bash
run: python -I scripts/whats_left.py --rustpython target/release/rustpython

# Run all production checks before rebuilding the same binary with C API.
# Keep these features in sync with update-caches.yml CARGO_ARGS.
- name: Build RustPython with C API
id: build_capi
if: ${{ !cancelled() && steps.build_default.outcome == 'success' }}
run: cargo build --locked --release --verbose --features=threading,jit,capi ${{ env.CARGO_ARGS }}
env:
PYO3_CONFIG_FILE: ${{ github.workspace }}/crates/capi/pyo3-rustpython.config
PYO3_NO_PYTHON: "1"

# A failed production check must not suppress this cohort or become green.
- name: Run CPython tests (C API)
if: ${{ !cancelled() && steps.build_capi.outcome == 'success' }}
run: |
target/release/rustpython -u -m test --slow-ci -j "$CORES" $EXTRA_TEST_ARGS test_frame test_inspect test_monitoring

Check warning on line 721 in .github/workflows/ci.yaml

View workflow job for this annotation

GitHub Actions / Lint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:1:60: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/ci.yaml:721:70: shellcheck reported issue in this script: SC2086:info:1:60: Double quote to prevent globbing and word splitting [shellcheck]
timeout-minutes: ${{ matrix.timeout }}
shell: bash
env:
RUSTPYTHON_SKIP_ENV_POLLUTERS: true
CORES: ${{ steps.cores.outputs.cores }}
EXTRA_TEST_ARGS: ${{ join(matrix.extra_test_args, ' ') }}

clippy:
# Named after the matrix entry rather than left to be named for it: a
# generated name lists every value in the entry, so adding or removing one
Expand Down Expand Up @@ -731,7 +780,12 @@
continue-on-error: true

- name: Clippy
run: cargo clippy --locked --keep-going ${{ env.CARGO_ARGS_MOST_FEATS }} --workspace --all-targets --bins --examples --tests ${{ env.WORKSPACE_EXCLUDES }} -- -Dwarnings
run: cargo clippy --locked --keep-going ${{ env.CARGO_ARGS_MOST_FEATS }} --workspace --exclude rustpython-capi --all-targets --bins --examples --tests ${{ env.WORKSPACE_EXCLUDES }} -- -Dwarnings

# Load the C-API crate's RustPython-specific PyO3 configuration.
- name: Clippy C API
working-directory: crates/capi
run: cargo clippy --locked --all-targets -- -Dwarnings

# macOS/Windows clippy uses the same OS-surface filter as cargo check.
# Force with the run:cross-check label. Check names stay clippy (<os>).
Expand Down Expand Up @@ -794,6 +848,9 @@

- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0

- name: Verify the CPython reference environment
run: python -c "import bz2, ctypes, lzma, pathlib, platform, sqlite3, ssl; expected = pathlib.Path('.python-version').read_text().strip(); actual = platform.python_version(); assert actual == expected, (actual, expected)"

- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
Expand Down Expand Up @@ -1061,10 +1118,13 @@
builtin_str
builtin_thread
cli_int_max_str_digits
import_lazy_native
protocol_index_argument
recursion
stdlib_ast
stdlib_asyncio
stdlib_asyncio_reinitialization_315
stdlib_bytearray_take_bytes_threads_315
stdlib_collections_deque
stdlib_contextvars
stdlib_ctypes
Expand All @@ -1076,17 +1136,20 @@
stdlib_io_blocking_buffer
stdlib_itertools
stdlib_json
stdlib_lock_precedence_315
stdlib_mmap
stdlib_multiprocessing_condition
stdlib_multiprocessing_fork_sharer
stdlib_multiprocessing_sharedctypes
stdlib_os
stdlib_pwd
stdlib_queue_signal
stdlib_rlock_constructor_315
stdlib_select
stdlib_socket
stdlib_sqlite
stdlib_ssl
stdlib_ssl_introspection
stdlib_ssl_short_recv
stdlib_struct
stdlib_subinterpreters
Expand All @@ -1103,6 +1166,8 @@
stdlib_types
stdlib_typing
stdlib_urllib_https_misaligned_recv
stdlib_venv_cycles
stdlib_weakref_gc_threads_315
stdlib_zoneinfo_cache
syntax_async
syntax_async_comprehension
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/cron-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,32 @@ env:
CARGO_ARGS: --no-default-features --features stdlib,importlib,stdio,encodings,ssl-rustls-aws-lc,jit,host_env,doc,ucd_3_2_0

jobs:
manager-coverage-regression:
name: Verify manager XML-RPC under coverage
runs-on: ubuntu-latest
permissions:
contents: read
# Leave room for the instrumented build and the normal 600-second test limit.
timeout-minutes: 30
if: ${{ github.repository == 'RustPython/RustPython' || github.event_name != 'schedule' }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- uses: dtolnay/rust-toolchain@stable

- uses: taiki-e/install-action@8cca0918f8471c33515202b73f56ab27f2bed283 # v2.87.29
with:
tool: cargo-llvm-cov

# Keep this strict check independent of the full coverage collection below.
- name: Run the canonical manager XML-RPC regression
run: >-
cargo llvm-cov --no-report run --locked --
-m test -v -u all --timeout 600 --match '*test_remote'
test_multiprocessing_forkserver.test_manager

# codecov collects code coverage data from the rust tests, python snippets and python test suite.
# This is done using cargo-llvm-cov, which is a wrapper around llvm-cov.
codecov:
Expand Down Expand Up @@ -110,6 +136,9 @@ jobs:

- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0

- name: Verify the CPython reference environment
run: python -c "import bz2, ctypes, lzma, pathlib, platform, sqlite3, ssl; expected = pathlib.Path('.python-version').read_text().strip(); actual = platform.python_version(); assert actual == expected, (actual, expected)"

- name: build rustpython
run: cargo build --release --verbose --features sqlite

Expand Down Expand Up @@ -170,6 +199,12 @@ jobs:

- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0

- name: Verify the CPython reference environment
run: python -c "import bz2, ctypes, lzma, pathlib, platform, sqlite3, ssl; expected = pathlib.Path('.python-version').read_text().strip(); actual = platform.python_version(); assert actual == expected, (actual, expected)"

- name: Make the reference libpython available to benchmark executables
run: echo "LD_LIBRARY_PATH=$(python -c 'import sysconfig; print(sysconfig.get_config_var("LIBDIR"))')${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" >> "$GITHUB_ENV"

- run: cargo install cargo-criterion

- name: build benchmarks
Expand Down
91 changes: 64 additions & 27 deletions .github/workflows/lib-deps-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,43 +111,80 @@ jobs:

- name: Run deps check
if: steps.changed-files.outputs.modules != ''
id: deps-check
run: |
# Run deps for all modules at once
echo "deps_output<<EOF" >> "$GITHUB_OUTPUT"
output=$(python scripts/update_lib deps "${MODULES}" --depth 2 2>&1 || true)
output=$(python -c '
import sys

output = sys.stdin.read()
limit = 60000
encoded = output.encode()
if len(encoded) > limit:
output = encoded[:limit].decode("utf-8", errors="ignore")
output += "\n\n[Dependency report truncated to fit in a GitHub comment.]"
print(output, end="")
' <<< "$output")
echo "$output" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
python scripts/update_lib deps "${MODULES}" --depth 2 > "$RUNNER_TEMP/lib-deps-report.md" 2>&1 || true
env:
MODULES: ${{ steps.changed-files.outputs.modules }}

- name: Prepare dependency report
if: steps.changed-files.outputs.modules != ''
id: deps-comment
shell: python
run: |
from os import environ
from pathlib import Path

report_path = Path(environ["RUNNER_TEMP"]) / "lib-deps-report.md"
report = report_path.read_text(encoding="utf-8")
if report:
heading = "## 📦 Library Dependencies\n\n"
body = (
heading
+ "The following Lib/ modules were modified. Here are their dependencies:\n\n"
+ report
+ "\n\n**Legend:**\n"
+ "- `[+]` path exists in CPython\n"
+ "- `[x]` up-to-date, `[ ]` outdated\n"
)
report_path.write_text(body, encoding="utf-8")
body_size = len(body.encode("utf-8"))
run_url = (
f"{environ['GITHUB_SERVER_URL']}/{environ['GITHUB_REPOSITORY']}"
f"/actions/runs/{environ['GITHUB_RUN_ID']}"
)

# Job summaries have a 1 MiB limit; keep larger reports as artifacts.
needs_artifact = body_size > 1024 * 1024
summary = body
if needs_artifact:
summary = (
heading
+ "The dependency report exceeds the job summary limit. "
+ "Download the full report from this run's `lib-deps-report` artifact.\n"
)
with open(environ["GITHUB_STEP_SUMMARY"], "a", encoding="utf-8") as fd:
fd.write(summary)

# Leave room for the action's marker, counting UTF-8 bytes, not characters.
comment = body
if body_size >= 60000:
comment = (
heading
+ "The dependency report is too large for a pull request comment. "
+ f"[View the full report in the workflow run]({run_url}#summary).\n"
)
comment_path = Path(environ["RUNNER_TEMP"]) / "lib-deps-comment.md"
comment_path.write_text(comment, encoding="utf-8")
with open(environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as fd:
fd.write("has_report=true\n")
fd.write(f"needs_artifact={str(needs_artifact).lower()}\n")

- name: Upload oversized dependency report
if: steps.deps-comment.outputs.needs_artifact == 'true'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: lib-deps-report
path: ${{ runner.temp }}/lib-deps-report.md
if-no-files-found: error

- name: Post comment
if: steps.deps-check.outputs.deps_output != ''
if: steps.deps-comment.outputs.has_report == 'true'
uses: marocchino/sticky-pull-request-comment@5770ad5eb8f42dd2c4f34da00c94c5381e49af88 # v3.0.5
with:
header: lib-deps-check
number: ${{ github.event.pull_request.number }}
message: |
## 📦 Library Dependencies

The following Lib/ modules were modified. Here are their dependencies:

${{ steps.deps-check.outputs.deps_output }}

**Legend:**
- `[+]` path exists in CPython
- `[x]` up-to-date, `[ ]` outdated
path: ${{ runner.temp }}/lib-deps-comment.md

- name: Remove comment if no Lib changes
if: steps.changed-files.outputs.modules == ''
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/update-caches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ concurrency:
cancel-in-progress: false

env:
PYO3_CONFIG_FILE: ${{ github.workspace }}/crates/capi/pyo3-rustpython.config
PYO3_NO_PYTHON: "1"
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
CARGO_PROFILE_TEST_DEBUG: 0
CARGO_PROFILE_DEV_DEBUG: 0
CARGO_PROFILE_RELEASE_DEBUG: 0
# Keep feature list in sync with CI's release build in .github/workflows/ci.yaml.
CARGO_ARGS: --workspace --no-default-features --features stdlib,importlib,stdio,encodings,sqlite,ssl-rustls-aws-lc,host_env,threading,jit,doc --exclude rustpython_wasm --exclude rustpython-venvlauncher
CARGO_ARGS: --workspace --no-default-features --features stdlib,importlib,stdio,encodings,sqlite,ssl-rustls-aws-lc,host_env,threading,jit,capi,doc --exclude rustpython_wasm --exclude rustpython-venvlauncher

jobs:
build-caches:
Expand Down
Loading
Loading