From 1208416b92aa20268d2eabbf5092e7b411c5555b Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Wed, 30 Aug 2023 22:21:46 +0900 Subject: [PATCH] 0.3.0 release --- Cargo.lock | 32 ++++++++++++------------- Cargo.toml | 47 ++++++++++++++++++------------------- benches/execution.rs | 5 ++-- common/Cargo.toml | 2 +- compiler/Cargo.toml | 4 +++- compiler/codegen/Cargo.toml | 2 +- compiler/core/Cargo.toml | 5 ++-- derive-impl/Cargo.toml | 6 ++++- derive/Cargo.toml | 6 ++--- jit/Cargo.toml | 4 ++-- pylib/Cargo.toml | 4 ++-- stdlib/Cargo.toml | 12 ++++++---- vm/Cargo.toml | 14 +++++------ wapm.toml | 2 +- wasm/lib/Cargo.toml | 10 ++++---- 15 files changed, 82 insertions(+), 73 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2d2e02ce8..36335bb39 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", ] @@ -1981,7 +1981,7 @@ dependencies = [ [[package]] name = "rustpython" -version = "0.2.0" +version = "0.3.0" dependencies = [ "atty", "cfg-if", @@ -2017,7 +2017,7 @@ dependencies = [ [[package]] name = "rustpython-codegen" -version = "0.2.0" +version = "0.3.0" dependencies = [ "ahash", "bitflags 2.3.1", @@ -2035,7 +2035,7 @@ dependencies = [ [[package]] name = "rustpython-common" -version = "0.2.0" +version = "0.3.0" dependencies = [ "ascii", "bitflags 2.3.1", @@ -2061,7 +2061,7 @@ dependencies = [ [[package]] name = "rustpython-compiler" -version = "0.2.0" +version = "0.3.0" dependencies = [ "rustpython-codegen", "rustpython-compiler-core", @@ -2070,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", @@ -2083,7 +2083,7 @@ dependencies = [ [[package]] name = "rustpython-derive" -version = "0.2.0" +version = "0.3.0" dependencies = [ "rustpython-compiler", "rustpython-derive-impl", @@ -2092,7 +2092,7 @@ dependencies = [ [[package]] name = "rustpython-derive-impl" -version = "0.2.0" +version = "0.3.0" dependencies = [ "itertools 0.10.5", "maplit", @@ -2109,8 +2109,8 @@ 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", ] @@ -2129,7 +2129,7 @@ dependencies = [ [[package]] name = "rustpython-jit" -version = "0.2.0" +version = "0.3.0" dependencies = [ "approx", "cranelift", @@ -2198,7 +2198,7 @@ dependencies = [ [[package]] name = "rustpython-pylib" -version = "0.2.0" +version = "0.3.0" dependencies = [ "glob", "rustpython-compiler-core", @@ -2207,7 +2207,7 @@ dependencies = [ [[package]] name = "rustpython-stdlib" -version = "0.2.0" +version = "0.3.0" dependencies = [ "adler32", "ahash", @@ -2278,7 +2278,7 @@ dependencies = [ [[package]] name = "rustpython-vm" -version = "0.2.0" +version = "0.3.0" dependencies = [ "ahash", "ascii", @@ -2354,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 10898d2ca..d56f61ee5 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-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" } -rustpython-parser-core = { git = "https://github.com/RustPython/Parser.git", tag = "0.3.0" } -rustpython-parser = { git = "https://github.com/RustPython/Parser.git", tag = "0.3.0" } -rustpython-ast = { git = "https://github.com/RustPython/Parser.git", tag = "0.3.0" } -rustpython-format = { git = "https://github.com/RustPython/Parser.git", tag = "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 6e0c1503e..14fadfc2a 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, 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 42b46cb51..397897f49 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 8d5d81e0b..8dec426b2 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 6d33f4883..8cfd485b8 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 4fc05510b..d515d2070 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 1c6b214cc..2b2b4131b 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 f14d6db49..5010877a6 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 0a7ff67fb..71f8822cc 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 b2e6ab6f0..256dbe9d6 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 aa63df0eb..cdb3902e5 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 fb3ab1e55..167bb956d 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 c8aabc9cc..98bf96bed 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 15276ae74..98be000fe 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 }