Remove the deprecated compiler-source crate and mark venvlauncher unpublishable (#8698)

* Remove the deprecated rustpython-compiler-source crate

Nothing in the workspace depends on it, and its version was pinned to
0.4.1+deprecated, which is already on crates.io. Drop the crate, its
Cargo.lock entry, and the mentions in host_env_proposal.md.

Assisted-by: Claude Code:claude-fable-5-1

* ci: drop the rustpython-compiler-source exclusions

The crate no longer exists in the workspace.

Assisted-by: Claude Code:claude-fable-5-1

* venvlauncher: mark the crate as not publishable

It is a Windows-only binary that venv copies out of the installation,
not a crates.io dependency.

Assisted-by: Claude Code:claude-fable-5-1
This commit is contained in:
Jeong, YunWon authored and GitHub committed 2026-09-13 16:23:12 +09:00
1 parent 44dcd1de2d
commit a973fbf472
8 files changed
+6 -74

No files matched your search

+1 -2
View File
@@ -23,9 +23,8 @@ env:
CARGO_ARGS_NO_SSL: --no-default-features --features stdlib,importlib,stdio,encodings,sqlite,host_env
# Crates excluded from workspace builds:
# - rustpython_wasm: requires wasm target
# - rustpython-compiler-source: deprecated
# - rustpython-venvlauncher: Windows-only
WORKSPACE_EXCLUDES: --exclude rustpython_wasm --exclude rustpython-compiler-source --exclude rustpython-venvlauncher
WORKSPACE_EXCLUDES: --exclude rustpython_wasm --exclude rustpython-venvlauncher
X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR: C:\Program Files\OpenSSL\lib\VC\x64\MD
X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR: C:\Program Files\OpenSSL\include
CARGO_INCREMENTAL: 0
+1 -1
View File
@@ -42,7 +42,7 @@ jobs:
- run: sudo apt-get update && sudo apt-get -y install lcov
- name: Run cargo-llvm-cov with Rust tests.
run: cargo llvm-cov --no-report --workspace --exclude rustpython_wasm --exclude rustpython-compiler-source --exclude rustpython-venvlauncher --exclude rustpython-capi --verbose --no-default-features --features stdlib,importlib,stdio,encodings,ssl-rustls-aws-lc,jit,host_env
run: cargo llvm-cov --no-report --workspace --exclude rustpython_wasm --exclude rustpython-venvlauncher --exclude rustpython-capi --verbose --no-default-features --features stdlib,importlib,stdio,encodings,ssl-rustls-aws-lc,jit,host_env
- name: Run cargo-llvm-cov with Python snippets.
run: python scripts/cargo-llvm-cov.py
+1 -1
View File
@@ -20,7 +20,7 @@ env:
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 --exclude rustpython_wasm --exclude rustpython-compiler-source --exclude rustpython-venvlauncher
CARGO_ARGS: --workspace --no-default-features --features stdlib,importlib,stdio,encodings,sqlite,ssl-rustls-aws-lc,host_env,threading,jit --exclude rustpython_wasm --exclude rustpython-venvlauncher
jobs:
build-caches:
Generated
-8
View File
@@ -3296,14 +3296,6 @@ dependencies = [
"rustpython-wtf8",
]
[[package]]
name = "rustpython-compiler-source"
version = "0.4.1+deprecated"
dependencies = [
"rustpython-ruff_source_file",
"rustpython-ruff_text_size",
]
[[package]]
name = "rustpython-derive"
version = "0.5.0"
-16
View File
@@ -1,16 +0,0 @@
[package]
name = "rustpython-compiler-source"
description = "(DEPRECATED) RustPython Source and Index"
version = "0.4.1+deprecated"
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
repository.workspace = true
license.workspace = true
[dependencies]
ruff_source_file = { workspace = true }
ruff_text_size = { workspace = true }
[lints]
workspace = true
-43
View File
@@ -1,43 +0,0 @@
pub use ruff_source_file::{LineIndex, OneIndexed as LineNumber, PositionEncoding, SourceLocation};
use ruff_text_size::TextRange;
pub use ruff_text_size::TextSize;
#[derive(Clone)]
pub struct SourceCode<'src> {
pub path: &'src str,
pub text: &'src str,
pub index: LineIndex,
}
impl<'src> SourceCode<'src> {
pub fn new(path: &'src str, text: &'src str) -> Self {
let index = LineIndex::from_source_text(text);
Self { path, text, index }
}
pub fn line_index(&self, offset: TextSize) -> LineNumber {
self.index.line_index(offset)
}
pub fn source_location(&self, offset: TextSize) -> SourceLocation {
self.index
.source_location(offset, self.text, PositionEncoding::Utf8)
}
pub fn get_range(&'src self, range: TextRange) -> &'src str {
&self.text[range.start().to_usize()..range.end().to_usize()]
}
}
pub struct SourceCodeOwned {
pub path: String,
pub text: String,
pub index: LineIndex,
}
impl SourceCodeOwned {
pub fn new(path: String, text: String) -> Self {
let index = LineIndex::from_source_text(&text);
Self { path, text, index }
}
}
+1
View File
@@ -7,6 +7,7 @@ edition.workspace = true
rust-version.workspace = true
repository.workspace = true
license.workspace = true
publish = false
# Free-threaded variants (RustPython uses Py_GIL_DISABLED=true)
[[bin]]
+2 -3
View File
@@ -347,7 +347,7 @@ The strongest guarantee. If a crate doesn't list `rustpython-host_env` in its `[
**Pure crates (no host_env dependency allowed):**
- `rustpython-common`
- `rustpython-compiler`, `rustpython-compiler-core`, `rustpython-compiler-source`
- `rustpython-compiler`, `rustpython-compiler-core`
- `rustpython-codegen`
- `rustpython-literal`
- `rustpython-sre_engine`
@@ -357,7 +357,7 @@ The strongest guarantee. If a crate doesn't list `rustpython-host_env` in its `[
CI check:
```bash
# Verify pure crates don't depend on host_env
for crate in common compiler compiler-core compiler-source codegen literal sre_engine wtf8 derive derive-impl; do
for crate in common compiler compiler-core codegen literal sre_engine wtf8 derive derive-impl; do
if rg 'rustpython-host_env' "crates/$crate/Cargo.toml"; then
echo "ERROR: $crate should not depend on host_env"
exit 1
@@ -471,7 +471,6 @@ After removing host modules from `common`, it could potentially become `#![no_st
Candidate crates for unconditional `#![no_std]`:
- `rustpython-literal`
- `rustpython-wtf8`
- `rustpython-compiler-source`
### Summary of enforcement layers