⚡ Sangsakala Proxy 🏠 Home
Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6c25298
Target Python 3.15 using the final upstream reference
youknowdot Oct 9, 2026
519370b
Adapt essential snippet contracts to Python 3.15 final
youknowdot Oct 9, 2026
0486d6d
Keep final-reference regression paths and remove expired sysconfig ar…
youknowdot Oct 9, 2026
67f79ea
Keep README wording unchanged in Python 3.15 transition
youknowdot Oct 9, 2026
72a6330
Match Python 3.15 repetition specialization and keep universal tests
youknowdot Oct 9, 2026
2002f53
Limit in-place specialization additions to exact sequence repetition
youknowdot Oct 9, 2026
8d6c943
Keep subclass regression scoped to repetition dispatch
youknowdot Oct 9, 2026
ae03487
Provision final CPython 3.15 with pinned uv builds
youknowdot Oct 9, 2026
33198c7
Enforce Python 3.15 AST constructor requirements
youknowdot Oct 9, 2026
8aff205
Keep seeded Python ahead of its Windows DLL directory
youknowdot Oct 9, 2026
934493b
Keep opcode metadata tied to the implemented bytecode format
youknowdot Oct 9, 2026
8573d91
Align CSV, logarithm and decimal formatting with Python 3.15
youknowdot Oct 9, 2026
459395b
Bind the logarithm index result before borrowing its integer
youknowdot Oct 10, 2026
9391879
Align required canonical test expectations with Python 3.15
youknowdot Oct 10, 2026
dcc5619
Track pending frozendict pickle support during the 3.15 transition
youknowdot Oct 10, 2026
54dfc8d
Support final Python 3.15 Windows negative timestamps
youknowdot Oct 10, 2026
d517416
Derive historical Windows timezone offsets from wall time
youknowdot Oct 10, 2026
1003f62
Identify decimal formatting arguments in Python 3.15 errors
youknowdot Oct 10, 2026
b4468ee
Reuse mapping format keys for lookup and error context
youknowdot Oct 10, 2026
4e854bb
Borrow mapping diagnostic keys as Python objects
youknowdot Oct 10, 2026
90d2d12
Avoid empty components in the reference Python library path
youknowdot Oct 10, 2026
1af8926
Isolate RustPython bytecode caches during the 3.15 transition
youknowdot Oct 10, 2026
3eb4607
Sync final Windows timestamp test expectations
youknowdot Oct 10, 2026
7c77f5e
Restore official Python setup for 3.15 final
youknowdot Oct 10, 2026
73ea417
Merge current main into Python 3.15 migration
youknowdot Oct 10, 2026
d7b4be2
Align merged runtime contracts with Python 3.15 final
youknowdot Oct 10, 2026
fd56e29
Limit Windows launcher version check to its interpreter
youknowdot Oct 11, 2026
80d3e52
Merge main for the shared Python 3.15 stack base
youknowdot Oct 11, 2026
df73fa0
Merge branch 'main' into cpython-315-essential-bootstrap
youknowone Oct 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Target Python 3.15 using the final upstream reference
Update active version and comparison configuration to Python 3.15.0. Preserve the alpha implementation status, actual bytecode format, and existing libraries pending separate migration. Align generated library-upgrade workflow pins without changing permissions or actions.

Assisted-by: OpenAI Codex:model identifier unavailable
  • Loading branch information
youknowdot committed Oct 9, 2026
commit 6c2529800a593fdf7f8cd123b1b17e33be0f03aa
6 changes: 3 additions & 3 deletions .claude/scripts/setup-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if [ "$(printf '%s\n' "3.13" "$CURRENT_PY" | sort -V | head -1)" != "3.13" ]; th
echo "Upgrading python3 default to 3.13..."
# Find best available Python >= 3.13
TARGET=""
for ver in python3.14 python3.13; do
for ver in python3.15 python3.14 python3.13; do
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
if command -v "$ver" &>/dev/null; then
TARGET=$(command -v "$ver")
break
Expand All @@ -40,8 +40,8 @@ fi

# 2. Clone CPython source if not present (needed for scripts/update_lib)
if [ ! -d "cpython" ]; then
echo "Cloning CPython v3.14.3 (shallow)..."
git clone --depth 1 --branch v3.14.3 https://github.com/python/cpython.git cpython
echo "Cloning CPython v3.15.0 (shallow)..."
git clone --depth 1 --branch v3.15.0 https://github.com/python/cpython.git cpython

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Refresh an existing CPython checkout to v3.15

When this startup script is rerun in a workspace that already contains the v3.14.3 clone created by the previous version, the directory-only guard takes the else path and this new v3.15.0 clone command is never executed. Since scripts/update_lib quick reads directly from the existing cpython/ tree and does not validate the requested target, subsequent library work continues against 3.14; verify/fetch the tag or replace an out-of-date checkout instead of checking only for directory existence.

Useful? React with 👍 / 👎.

echo "CPython source ready."
else
echo "CPython source already present."
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pyperformance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
id: cpython
with:
python-version: "3.14"
python-version: "3.15"

- name: Restore cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-doc-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
python-version:
description: Target python version to generate doc db for
type: string
default: "3.14.7"
default: "3.15.0"
base-ref:
description: Base branch to create the update branch from
type: string
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/upgrade-pylib.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/upgrade-pylib.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ engine: copilot

runtimes:
python:
version: "3.14"
version: "3.15"

tools:
bash:
Expand All @@ -52,7 +52,7 @@ cache:
- cpython-lib-

env:
PYTHON_VERSION: "v3.14.7"
PYTHON_VERSION: "v3.15.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reject stale CPython caches before library upgrades

When the Upgrade Python Library workflow is dispatched while a cpython-lib-v3.14.* cache exists, this version bump makes the primary key miss, the frontmatter's restore-keys: cpython-lib- restores that old cpython/ tree, and Step 1 later skips cloning whenever cpython/Lib exists. scripts/update_lib quick then copies 3.14 library files even though the workflow and PR template target v3.15.0; validate or check out $PYTHON_VERSION after restoring, or remove the cross-version fallback.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 8d6c943. The workflow source and regenerated lock file no longer restore cross-version CPython caches. Both the workflow setup and .claude/scripts/setup-env.sh reject an existing checkout unless HEAD matches v3.15.0 and the working tree is clean; they leave stale or dirty files untouched. The cache validation fixtures and workflow security scan pass. Hosted CI is still pending.

ISSUE_ID: "6839"
---

Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.14.7
3.15.0
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This document provides guidelines for AI coding agents (GitHub Copilot, Claude C

## Project Overview

RustPython is a Python 3 interpreter written in Rust, implementing Python 3.14.0+ compatibility. The project aims to provide:
RustPython is a Python 3 interpreter written in Rust, targeting Python 3.15 with compatibility work in progress. The project aims to provide:

- A complete Python-3 environment entirely in Rust (not CPython bindings)
- A clean implementation without compatibility hacks
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ RustPython requires the following:
stable version: `rustup update stable`
- If you do not have Rust installed, use [rustup](https://rustup.rs/) to
do so.
- CPython version 3.14 or higher
- CPython version 3.15 or higher
- CPython can be installed by your operating system's package manager,
from the [Python website](https://www.python.org/downloads/), or
using a third-party distribution, such as
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

# [RustPython](https://rustpython.github.io/)

A Python-3 (CPython >= 3.14.0) Interpreter written in Rust :snake: :scream:
A Python-3 interpreter written in Rust, targeting CPython 3.15 :snake: :scream:
:metal:.

Python 3.15 compatibility is a work in progress.

[![Build Status](https://github.com/RustPython/RustPython/workflows/CI/badge.svg)](https://github.com/RustPython/RustPython/actions?query=workflow%3ACI)
[![codecov](https://codecov.io/gh/RustPython/RustPython/branch/main/graph/badge.svg)](https://codecov.io/gh/RustPython/RustPython)
[![CodSpeed](https://img.shields.io/endpoint?url=https://codspeed.io/badge.json)](https://app.codspeed.io/RustPython/RustPython?utm_source=badge)
Expand Down
4 changes: 2 additions & 2 deletions crates/vm/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ fn main() {
}
println!("cargo:rerun-if-changed=../../Lib/importlib/_bootstrap.py");

// = 3.14.0alpha
python_version(3, 14, 0, "alpha", 0);
// = 3.15.0alpha
python_version(3, 15, 0, "alpha", 0);

println!("cargo:rustc-env=RUSTPYTHON_GIT_HASH={}", git_hash());
println!(
Expand Down
6 changes: 3 additions & 3 deletions crates/vm/src/stdlib/_ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1804,7 +1804,7 @@ pub(crate) fn parse<E: From<CompileError>>(
) -> Result<PyObjectRef, E> {
let source_file = SourceFileBuilder::new(filename.to_owned(), source.to_owned()).finish();
let mut options = parser::ParseOptions::from(mode);
let target_version = target_version.unwrap_or(ast::PythonVersion::PY314);
let target_version = target_version.unwrap_or(ast::PythonVersion::PY315);
if let Some(error) = feature_version_syntax_error(source, &source_file, target_version) {
return Err(error.into());
}
Expand Down Expand Up @@ -2045,7 +2045,7 @@ pub(crate) fn parse_func_type<E: From<CompileError>>(
let parse_expr = |expr_src: &str| -> Result<ast::Expr, CompileError> {
let source_file = SourceFileBuilder::new(filename.to_owned(), expr_src.to_owned()).finish();
let options = parser::ParseOptions::from(parser::Mode::Expression)
.with_target_version(target_version.unwrap_or(ast::PythonVersion::PY314));
.with_target_version(target_version.unwrap_or(ast::PythonVersion::PY315));
let parsed = parser::parse(expr_src, options).map_err(|parse_error| {
let range = text_range_to_source_range(&source_file, parse_error.location);
CompileError::from(ParseError {
Expand Down Expand Up @@ -2080,7 +2080,7 @@ pub(crate) fn parse_func_type<E: From<CompileError>>(
let call_source = format!("{ARG_PREFIX}{inner})");
let source_file = SourceFileBuilder::new(filename.to_owned(), call_source.clone()).finish();
let options = parser::ParseOptions::from(parser::Mode::Expression)
.with_target_version(target_version.unwrap_or(ast::PythonVersion::PY314));
.with_target_version(target_version.unwrap_or(ast::PythonVersion::PY315));
let parsed = parser::parse(&call_source, options).map_err(|parse_error| {
let range = text_range_to_source_range(&source_file, parse_error.location);
CompileError::from(ParseError {
Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/vm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1607,7 +1607,7 @@ impl VirtualMachine {
/// ```no_run
/// use rustpython_vm::Interpreter;
/// Interpreter::without_stdlib(Default::default()).enter(|vm| {
/// let bytes = std::fs::read("__pycache__/<input>.rustpython-314.pyc").unwrap();
/// let bytes = std::fs::read("__pycache__/<input>.rustpython-315.pyc").unwrap();
/// let main_scope = vm.new_scope_with_main().unwrap();
/// vm.run_pyc_bytes(&bytes, main_scope);
/// });
Expand Down
6 changes: 6 additions & 0 deletions extra_tests/snippets/stdlib_sys.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
assert isinstance(sys.implementation.name, str)
assert isinstance(sys.implementation.cache_tag, str)

if sys.implementation.name == "rustpython":

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is nonsense. do not add sys.implementation.name == "rustpython": test. it is meaninglses

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in 8d6c943: these assertions are now shared by both interpreters and check the 3.15.0 version fields and cache tag without an implementation-name guard or an alpha-only assertion. The same snippet passes on RustPython and official CPython 3.15.0.

assert sys.version_info == (3, 15, 0, "alpha", 0)
assert sys.hexversion == 0x030F00A0
assert sys.version.startswith("3.15.0.alpha (")
assert sys.implementation.cache_tag == "rustpython-315"

assert sys.getfilesystemencoding() == "utf-8"
assert sys.getfilesystemencodeerrors().startswith("surrogate")

Expand Down
2 changes: 1 addition & 1 deletion scripts/libc_posix.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import tomllib

CPYTHON_VERSION = "3.14"
CPYTHON_VERSION = "3.15"

CONSTS_PATTERN = re.compile(r"\b_*[A-Z]+(?:_+[A-Z]+)*_*\b")

Expand Down
6 changes: 3 additions & 3 deletions scripts/whats_left.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env -S python3 -I
# /// script
# requires-python = ">=3.14"
# requires-python = ">=3.15.0"
# ///

# This script generates Lib/snippets/whats_left_data.py with these variables defined:
Expand Down Expand Up @@ -39,9 +39,9 @@
implementation = platform.python_implementation()
if implementation != "CPython":
sys.exit(f"whats_left.py must be run under CPython, got {implementation} instead")
if sys.version_info[:2] < (3, 14):
if sys.version_info[:2] < (3, 15):
sys.exit(
f"whats_left.py must be run under CPython 3.14 or newer, got {implementation} {sys.version} instead. If you have uv, try `uv run python -I scripts/whats_left.py` to select a proper Python interpreter easier."
f"whats_left.py must be run under CPython 3.15 or newer, got {implementation} {sys.version} instead. If you have uv, try `uv run python -I scripts/whats_left.py` to select a proper Python interpreter easier."
)


Expand Down