Repository: RustPython/RustPython (language: rust)

Issue:
Update crates.io with RustPython 0.2.0
Currently crates.io says latest RustPython version to be v0.1.2 but I can see current version v0.2.0 in github releases. Shouldn't crates.io point to latest version (v0.2.0) as well?

README.MD banner mentions few failing builds/outdated dependencies corresponding to v0.1.2, it would be better if it shows latest version instead.


Discussion / hints:
See also: https://github.com/RustPython/RustPython/issues/3539

Fix patch:
diff --git a/Cargo.lock b/Cargo.lock
index f79b0748a6..36335bb395 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -548,9 +548,9 @@ dependencies = [
 
 [[package]]
 name = "crossbeam-utils"
-version = "0.8.14"
+version = "0.8.16"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f"
+checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294"
 dependencies = [
  "cfg-if",
 ]
@@ -1950,21 +1950,6 @@ dependencies = [
  "syn-ext",
 ]
 
-[[package]]
-name = "ruff_source_location"
-version = "0.0.0"
-source = "git+https://github.com/RustPython/Parser.git?rev=704eb40108239a8faf9bd1d4217e8dad0ac7edb3#704eb40108239a8faf9bd1d4217e8dad0ac7edb3"
-dependencies = [
- "memchr",
- "once_cell",
- "ruff_text_size",
-]
-
-[[package]]
-name = "ruff_text_size"
-version = "0.0.0"
-source = "git+https://github.com/RustPython/Parser.git?rev=704eb40108239a8faf9bd1d4217e8dad0ac7edb3#704eb40108239a8faf9bd1d4217e8dad0ac7edb3"
-
 [[package]]
 name = "rustc-hash"
 version = "1.1.0"
@@ -1996,7 +1981,7 @@ dependencies = [
 
 [[package]]
 name = "rustpython"
-version = "0.2.0"
+version = "0.3.0"
 dependencies = [
  "atty",
  "cfg-if",
@@ -2020,8 +2005,8 @@ dependencies = [
 
 [[package]]
 name = "rustpython-ast"
-version = "0.2.0"
-source = "git+https://github.com/RustPython/Parser.git?rev=704eb40108239a8faf9bd1d4217e8dad0ac7edb3#704eb40108239a8faf9bd1d4217e8dad0ac7edb3"
+version = "0.3.0"
+source = "git+https://github.com/RustPython/Parser.git?tag=0.3.0#a1e4336f7043807eda8a5ecb15d4115172cc4a7e"
 dependencies = [
  "is-macro",
  "malachite-bigint",
@@ -2032,7 +2017,7 @@ dependencies = [
 
 [[package]]
 name = "rustpython-codegen"
-version = "0.2.0"
+version = "0.3.0"
 dependencies = [
  "ahash",
  "bitflags 2.3.1",
@@ -2050,7 +2035,7 @@ dependencies = [
 
 [[package]]
 name = "rustpython-common"
-version = "0.2.0"
+version = "0.3.0"
 dependencies = [
  "ascii",
  "bitflags 2.3.1",
@@ -2076,7 +2061,7 @@ dependencies = [
 
 [[package]]
 name = "rustpython-compiler"
-version = "0.2.0"
+version = "0.3.0"
 dependencies = [
  "rustpython-codegen",
  "rustpython-compiler-core",
@@ -2085,7 +2070,7 @@ dependencies = [
 
 [[package]]
 name = "rustpython-compiler-core"
-version = "0.2.0"
+version = "0.3.0"
 dependencies = [
  "bitflags 2.3.1",
  "itertools 0.10.5",
@@ -2098,7 +2083,7 @@ dependencies = [
 
 [[package]]
 name = "rustpython-derive"
-version = "0.2.0"
+version = "0.3.0"
 dependencies = [
  "rustpython-compiler",
  "rustpython-derive-impl",
@@ -2107,7 +2092,7 @@ dependencies = [
 
 [[package]]
 name = "rustpython-derive-impl"
-version = "0.2.0"
+version = "0.3.0"
 dependencies = [
  "itertools 0.10.5",
  "maplit",
@@ -2124,16 +2109,16 @@ dependencies = [
 
 [[package]]
 name = "rustpython-doc"
-version = "0.1.0"
-source = "git+https://github.com/RustPython/__doc__?branch=main#d927debd491e4c45b88e953e6e50e4718e0f2965"
+version = "0.3.0"
+source = "git+https://github.com/RustPython/__doc__?tag=0.3.0#8b62ce5d796d68a091969c9fa5406276cb483f79"
 dependencies = [
  "once_cell",
 ]
 
 [[package]]
 name = "rustpython-format"
-version = "0.2.0"
-source = "git+https://github.com/RustPython/Parser.git?rev=704eb40108239a8faf9bd1d4217e8dad0ac7edb3#704eb40108239a8faf9bd1d4217e8dad0ac7edb3"
+version = "0.3.0"
+source = "git+https://github.com/RustPython/Parser.git?tag=0.3.0#a1e4336f7043807eda8a5ecb15d4115172cc4a7e"
 dependencies = [
  "bitflags 2.3.1",
  "itertools 0.10.5",
@@ -2144,7 +2129,7 @@ dependencies = [
 
 [[package]]
 name = "rustpython-jit"
-version = "0.2.0"
+version = "0.3.0"
 dependencies = [
  "approx",
  "cranelift",
@@ -2159,8 +2144,8 @@ dependencies = [
 
 [[package]]
 name = "rustpython-literal"
-version = "0.2.0"
-source = "git+https://github.com/RustPython/Parser.git?rev=704eb40108239a8faf9bd1d4217e8dad0ac7edb3#704eb40108239a8faf9bd1d4217e8dad0ac7edb3"
+version = "0.3.0"
+source = "git+https://github.com/RustPython/Parser.git?tag=0.3.0#a1e4336f7043807eda8a5ecb15d4115172cc4a7e"
 dependencies = [
  "hexf-parse",
  "is-macro",
@@ -2171,8 +2156,8 @@ dependencies = [
 
 [[package]]
 name = "rustpython-parser"
-version = "0.2.0"
-source = "git+https://github.com/RustPython/Parser.git?rev=704eb40108239a8faf9bd1d4217e8dad0ac7edb3#704eb40108239a8faf9bd1d4217e8dad0ac7edb3"
+version = "0.3.0"
+source = "git+https://github.com/RustPython/Parser.git?tag=0.3.0#a1e4336f7043807eda8a5ecb15d4115172cc4a7e"
 dependencies = [
  "anyhow",
  "is-macro",
@@ -2194,18 +2179,26 @@ dependencies = [
 
 [[package]]
 name = "rustpython-parser-core"
-version = "0.2.0"
-source = "git+https://github.com/RustPython/Parser.git?rev=704eb40108239a8faf9bd1d4217e8dad0ac7edb3#704eb40108239a8faf9bd1d4217e8dad0ac7edb3"
+version = "0.3.0"
+source = "git+https://github.com/RustPython/Parser.git?tag=0.3.0#a1e4336f7043807eda8a5ecb15d4115172cc4a7e"
 dependencies = [
  "is-macro",
  "memchr",
- "ruff_source_location",
- "ruff_text_size",
+ "rustpython-parser-vendored",
+]
+
+[[package]]
+name = "rustpython-parser-vendored"
+version = "0.3.0"
+source = "git+https://github.com/RustPython/Parser.git?tag=0.3.0#a1e4336f7043807eda8a5ecb15d4115172cc4a7e"
+dependencies = [
+ "memchr",
+ "once_cell",
 ]
 
 [[package]]
 name = "rustpython-pylib"
-version = "0.2.0"
+version = "0.3.0"
 dependencies = [
  "glob",
  "rustpython-compiler-core",
@@ -2214,7 +2207,7 @@ dependencies = [
 
 [[package]]
 name = "rustpython-stdlib"
-version = "0.2.0"
+version = "0.3.0"
 dependencies = [
  "adler32",
  "ahash",
@@ -2285,7 +2278,7 @@ dependencies = [
 
 [[package]]
 name = "rustpython-vm"
-version = "0.2.0"
+version = "0.3.0"
 dependencies = [
  "ahash",
  "ascii",
@@ -2361,7 +2354,7 @@ dependencies = [
 
 [[package]]
 name = "rustpython_wasm"
-version = "0.2.0"
+version = "0.3.0"
 dependencies = [
  "console_error_panic_hook",
  "js-sys",
diff --git a/Cargo.toml b/Cargo.toml
index cd10c10f92..d56f61ee59 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "rustpython"
-version = "0.2.0"
+version = "0.3.0"
 authors = ["RustPython Team"]
 edition = "2021"
 rust-version = "1.67.1"
@@ -17,23 +17,23 @@ members = [
 ]
 
 [workspace.dependencies]
-rustpython-compiler-core = { path = "compiler/core" }
-rustpython-compiler = { path = "compiler" }
-rustpython-codegen = { path = "compiler/codegen" }
-rustpython-common = { path = "common" }
-rustpython-derive = { path = "derive" }
-rustpython-derive-impl = { path = "derive-impl" }
-rustpython-jit = { path = "jit" }
-rustpython-vm = { path = "vm" }
-rustpython-pylib = { path = "pylib" }
-rustpython-stdlib = { path = "stdlib" }
-rustpython-doc = { git = "https://github.com/RustPython/__doc__", branch = "main" }
-
-rustpython-literal = { git = "https://github.com/RustPython/Parser.git", rev = "704eb40108239a8faf9bd1d4217e8dad0ac7edb3" }
-rustpython-parser-core = { git = "https://github.com/RustPython/Parser.git", rev = "704eb40108239a8faf9bd1d4217e8dad0ac7edb3" }
-rustpython-parser = { git = "https://github.com/RustPython/Parser.git", rev = "704eb40108239a8faf9bd1d4217e8dad0ac7edb3" }
-rustpython-ast = { git = "https://github.com/RustPython/Parser.git", rev = "704eb40108239a8faf9bd1d4217e8dad0ac7edb3" }
-rustpython-format = { git = "https://github.com/RustPython/Parser.git", rev = "704eb40108239a8faf9bd1d4217e8dad0ac7edb3" }
+rustpython-compiler-core = { path = "compiler/core", version = "0.3.0" }
+rustpython-compiler = { path = "compiler", version = "0.3.0" }
+rustpython-codegen = { path = "compiler/codegen", version = "0.3.0" }
+rustpython-common = { path = "common", version = "0.3.0" }
+rustpython-derive = { path = "derive", version = "0.3.0" }
+rustpython-derive-impl = { path = "derive-impl", version = "0.3.0" }
+rustpython-jit = { path = "jit", version = "0.3.0" }
+rustpython-vm = { path = "vm", version = "0.3.0" }
+rustpython-pylib = { path = "pylib", version = "0.3.0" }
+rustpython-stdlib = { path = "stdlib", version = "0.3.0" }
+rustpython-doc = { git = "https://github.com/RustPython/__doc__", tag = "0.3.0", version = "0.3.0" }
+
+rustpython-literal = { git = "https://github.com/RustPython/Parser.git", tag = "0.3.0", version = "0.3.0" }
+rustpython-parser-core = { git = "https://github.com/RustPython/Parser.git", tag = "0.3.0", version = "0.3.0" }
+rustpython-parser = { git = "https://github.com/RustPython/Parser.git", tag = "0.3.0", version = "0.3.0" }
+rustpython-ast = { git = "https://github.com/RustPython/Parser.git", tag = "0.3.0", version = "0.3.0" }
+rustpython-format = { git = "https://github.com/RustPython/Parser.git", tag = "0.3.0", version = "0.3.0" }
 # rustpython-literal = { path = "../RustPython-parser/literal" }
 # rustpython-parser-core = { path = "../RustPython-parser/core" }
 # rustpython-parser = { path = "../RustPython-parser/parser" }
@@ -48,7 +48,7 @@ bitflags = "2.2.1"
 bstr = "0.2.17"
 cfg-if = "1.0"
 chrono = "0.4.19"
-crossbeam-utils = "0.8.9"
+crossbeam-utils = "0.8.16"
 flame = "0.2.2"
 glob = "0.3"
 hex = "0.4.3"
@@ -94,11 +94,10 @@ ssl = ["rustpython-stdlib/ssl"]
 ssl-vendor = ["rustpython-stdlib/ssl-vendor"]
 
 [dependencies]
-rustpython-compiler = { path = "compiler", version = "0.2.0" }
-rustpython-pylib = { path = "pylib", optional = true, default-features = false }
-rustpython-stdlib = { path = "stdlib", optional = true, default-features = false }
-rustpython-vm = { path = "vm", version = "0.2.0", default-features = false, features = ["compiler"] }
-
+rustpython-compiler = { workspace = true }
+rustpython-pylib = { workspace = true, optional = true }
+rustpython-stdlib = { workspace = true, optional = true }
+rustpython-vm = { workspace = true, default-features = false, features = ["compiler"] }
 rustpython-parser = { workspace = true }
 
 atty = { workspace = true }
@@ -120,7 +119,7 @@ rustyline = { workspace = true }
 [dev-dependencies]
 cpython = "0.7.0"
 criterion = "0.3.5"
-python3-sys = "0.7.0"
+python3-sys = "0.7.1"
 
 [[bench]]
 name = "execution"
diff --git a/benches/execution.rs b/benches/execution.rs
index 6e0c1503e5..14fadfc2a5 100644
--- a/benches/execution.rs
+++ b/benches/execution.rs
@@ -3,7 +3,8 @@ use criterion::{
     criterion_group, criterion_main, Bencher, BenchmarkGroup, BenchmarkId, Criterion, Throughput,
 };
 use rustpython_compiler::Mode;
-use rustpython_parser::parse_program;
+use rustpython_parser::ast;
+use rustpython_parser::Parse;
 use rustpython_vm::{Interpreter, PyResult};
 use std::collections::HashMap;
 use std::path::Path;
@@ -51,7 +52,7 @@ pub fn benchmark_file_execution(
 pub fn benchmark_file_parsing(group: &mut BenchmarkGroup<WallTime>, name: &str, contents: &str) {
     group.throughput(Throughput::Bytes(contents.len() as u64));
     group.bench_function(BenchmarkId::new("rustpython", name), |b| {
-        b.iter(|| parse_program(contents, name).unwrap())
+        b.iter(|| ast::Suite::parse(contents, name).unwrap())
     });
     group.bench_function(BenchmarkId::new("cpython", name), |b| {
         let gil = cpython::Python::acquire_gil();
diff --git a/common/Cargo.toml b/common/Cargo.toml
index 42b46cb514..397897f491 100644
--- a/common/Cargo.toml
+++ b/common/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "rustpython-common"
-version = "0.2.0"
+version = "0.3.0"
 description = "General python functions and algorithms for use in RustPython"
 authors = ["RustPython Team"]
 edition = "2021"
diff --git a/compiler/Cargo.toml b/compiler/Cargo.toml
index 8d5d81e0bd..8dec426b2b 100644
--- a/compiler/Cargo.toml
+++ b/compiler/Cargo.toml
@@ -1,8 +1,10 @@
 [package]
 name = "rustpython-compiler"
-version = "0.2.0"
+version = "0.3.0"
 description = "A usability wrapper around rustpython-parser and rustpython-compiler-core"
 authors = ["RustPython Team"]
+repository = "https://github.com/RustPython/RustPython"
+license = "MIT"
 edition = "2021"
 
 [dependencies]
diff --git a/compiler/codegen/Cargo.toml b/compiler/codegen/Cargo.toml
index 6d33f48831..8cfd485b82 100644
--- a/compiler/codegen/Cargo.toml
+++ b/compiler/codegen/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "rustpython-codegen"
-version = "0.2.0"
+version = "0.3.0"
 description = "Compiler for python code into bytecode for the rustpython VM."
 authors = ["RustPython Team"]
 repository = "https://github.com/RustPython/RustPython"
diff --git a/compiler/core/Cargo.toml b/compiler/core/Cargo.toml
index 4fc05510be..d515d20707 100644
--- a/compiler/core/Cargo.toml
+++ b/compiler/core/Cargo.toml
@@ -1,14 +1,14 @@
 [package]
 name = "rustpython-compiler-core"
 description = "RustPython specific bytecode."
-version = "0.2.0"
+version = "0.3.0"
 authors = ["RustPython Team"]
 edition = "2021"
 repository = "https://github.com/RustPython/RustPython"
 license = "MIT"
 
 [dependencies]
-rustpython-parser-core = { workspace = true }
+rustpython-parser-core = { workspace = true, features=["location"] }
 
 bitflags = { workspace = true }
 itertools = { workspace = true }
@@ -17,4 +17,3 @@ num-complex = { workspace = true }
 serde = { version = "1.0.133", optional = true, default-features = false, features = ["derive"] }
 
 lz4_flex = "0.9.2"
-
diff --git a/derive-impl/Cargo.toml b/derive-impl/Cargo.toml
index 1c6b214cc6..2b2b4131b3 100644
--- a/derive-impl/Cargo.toml
+++ b/derive-impl/Cargo.toml
@@ -1,6 +1,10 @@
 [package]
 name = "rustpython-derive-impl"
-version = "0.2.0"
+version = "0.3.0"
+description = "Rust language extensions and macros specific to rustpython."
+authors = ["RustPython Team"]
+repository = "https://github.com/RustPython/RustPython"
+license = "MIT"
 edition = "2021"
 
 [dependencies]
diff --git a/derive/Cargo.toml b/derive/Cargo.toml
index f14d6db49e..5010877a6c 100644
--- a/derive/Cargo.toml
+++ b/derive/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "rustpython-derive"
-version = "0.2.0"
+version = "0.3.0"
 description = "Rust language extensions and macros specific to rustpython."
 authors = ["RustPython Team"]
 repository = "https://github.com/RustPython/RustPython"
@@ -11,6 +11,6 @@ edition = "2021"
 proc-macro = true
 
 [dependencies]
-rustpython-compiler = { path = "../compiler", version = "0.2.0" }
-rustpython-derive-impl = { path = "../derive-impl" }
+rustpython-compiler = { workspace = true }
+rustpython-derive-impl = { workspace = true }
 syn = { workspace = true }
diff --git a/jit/Cargo.toml b/jit/Cargo.toml
index 0a7ff67fb2..71f8822cc9 100644
--- a/jit/Cargo.toml
+++ b/jit/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "rustpython-jit"
-version = "0.2.0"
+version = "0.3.0"
 description = "Experimental JIT(just in time) compiler for python code."
 authors = ["RustPython Team"]
 repository = "https://github.com/RustPython/RustPython"
@@ -21,7 +21,7 @@ cranelift-module = "0.88.0"
 libffi = "3.1.0"
 
 [dev-dependencies]
-rustpython-derive = { path = "../derive", version = "0.2.0" }
+rustpython-derive = { path = "../derive", version = "0.3.0" }
 
 approx = "0.5.1"
 
diff --git a/pylib/Cargo.toml b/pylib/Cargo.toml
index b2e6ab6f09..256dbe9d61 100644
--- a/pylib/Cargo.toml
+++ b/pylib/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "rustpython-pylib"
-version = "0.2.0"
+version = "0.3.0"
 authors = ["RustPython Team"]
 description = "A subset of the Python standard library for use with RustPython"
 repository = "https://github.com/RustPython/RustPython"
@@ -13,7 +13,7 @@ freeze-stdlib = []
 
 [dependencies]
 rustpython-compiler-core = { workspace = true }
-rustpython-derive = { version = "0.2.0", path = "../derive" }
+rustpython-derive = { version = "0.3.0", path = "../derive" }
 
 [build-dependencies]
 glob = { workspace = true }
diff --git a/stdlib/Cargo.toml b/stdlib/Cargo.toml
index aa63df0eb6..cdb3902e52 100644
--- a/stdlib/Cargo.toml
+++ b/stdlib/Cargo.toml
@@ -1,6 +1,10 @@
 [package]
 name = "rustpython-stdlib"
-version = "0.2.0"
+version = "0.3.0"
+description = "RustPython standard libraries in Rust."
+authors = ["RustPython Team"]
+repository = "https://github.com/RustPython/RustPython"
+license = "MIT"
 edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -14,9 +18,9 @@ ssl-vendor = ["ssl", "openssl/vendored", "openssl-probe"]
 
 [dependencies]
 # rustpython crates
-rustpython-derive = { path = "../derive" }
-rustpython-vm = { path = "../vm" }
-rustpython-common = { path = "../common" }
+rustpython-derive = { workspace = true }
+rustpython-vm = { workspace = true }
+rustpython-common = { workspace = true }
 
 ahash = { workspace = true }
 ascii = { workspace = true }
diff --git a/vm/Cargo.toml b/vm/Cargo.toml
index fb3ab1e554..167bb956dc 100644
--- a/vm/Cargo.toml
+++ b/vm/Cargo.toml
@@ -1,7 +1,7 @@
 [package]
 name = "rustpython-vm"
-version = "0.2.0"
-description = "Rust Python virtual machine."
+version = "0.3.0"
+description = "RustPython virtual machine."
 authors = ["RustPython Team"]
 repository = "https://github.com/RustPython/RustPython"
 license = "MIT"
@@ -24,11 +24,11 @@ parser = ["rustpython-parser", "ast"]
 serde = ["dep:serde"]
 
 [dependencies]
-rustpython-compiler = { path = "../compiler", optional = true, version = "0.2.0" }
-rustpython-codegen = { path = "../compiler/codegen", optional = true, version = "0.2.0" }
-rustpython-common = { path = "../common" }
-rustpython-derive = { path = "../derive", version = "0.2.0" }
-rustpython-jit = { path = "../jit", optional = true, version = "0.2.0" }
+rustpython-compiler = { workspace = true, optional = true }
+rustpython-codegen = { workspace = true, optional = true }
+rustpython-common = { workspace = true }
+rustpython-derive = { workspace = true }
+rustpython-jit = { workspace = true, optional = true }
 
 rustpython-ast = { workspace = true, optional = true }
 rustpython-parser = { workspace = true, optional = true }
diff --git a/wapm.toml b/wapm.toml
index c8aabc9cce..98bf96bed1 100644
--- a/wapm.toml
+++ b/wapm.toml
@@ -1,6 +1,6 @@
 [package]
 name = "rustpython"
-version = "0.2.0"
+version = "0.3.0"
 description = "A Python-3 (CPython >= 3.5.0) Interpreter written in Rust 🐍 😱 🤘"
 license-file = "LICENSE"
 readme = "README.md"
diff --git a/wasm/lib/Cargo.toml b/wasm/lib/Cargo.toml
index 15276ae74b..98be000fee 100644
--- a/wasm/lib/Cargo.toml
+++ b/wasm/lib/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "rustpython_wasm"
-version = "0.2.0"
+version = "0.3.0"
 authors = ["RustPython Team"]
 license = "MIT"
 description = "A Python-3 (CPython >= 3.5.0) Interpreter written in Rust, compiled to WASM"
@@ -16,11 +16,11 @@ freeze-stdlib = ["rustpython-vm/freeze-stdlib", "rustpython-pylib/freeze-stdlib"
 no-start-func = []
 
 [dependencies]
-rustpython-common = { path = "../../common" }
-rustpython-pylib = { path = "../../pylib", default-features = false, optional = true }
-rustpython-stdlib = { path = "../../stdlib", default-features = false, optional = true }
+rustpython-common = { workspace = true }
+rustpython-pylib = { workspace = true, optional = true }
+rustpython-stdlib = { workspace = true, default-features = false, optional = true }
 # make sure no threading! otherwise wasm build will fail
-rustpython-vm = { path = "../../vm", default-features = false, features = ["compiler", "encodings", "serde"] }
+rustpython-vm = { workspace = true, default-features = false, features = ["compiler", "encodings", "serde"] }
 
 rustpython-parser = { workspace = true }
 


Test patch: