Replace num-bigint with malachite-bigint (#18)

Co-authored-by: Jeong YunWon <jeong@youknowone.org>
This commit is contained in:
Steve Shi 2023-06-02 10:06:18 +02:00 committed by GitHub
parent 5e9e8a7589
commit a2e3209c42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 51 additions and 37 deletions

View file

@ -8,7 +8,7 @@ repository = "https://github.com/RustPython/Parser/"
license = "MIT"
[features]
default = ["location"]
default = ["location", "malachite-bigint"]
constant-optimization = ["fold"]
location = ["fold", "rustpython-parser-core/location"]
fold = []
@ -21,7 +21,6 @@ rustpython-parser-core = { workspace = true }
rustpython-literal = { workspace = true, optional = true }
is-macro = { workspace = true }
num-bigint = { workspace = true }
num-bigint = { workspace = true, optional = true }
malachite-bigint = { workspace = true, optional = true }
static_assertions = "1.1.0"
pyo3 = { workspace = true, optional = true, features = ["num-bigint", "num-complex"] }

View file

@ -1,6 +1,6 @@
//! `builtin_types` in asdl.py and Attributed
use num_bigint::BigInt;
use crate::bigint::BigInt;
pub type String = std::string::String;

View file

@ -14,6 +14,11 @@ mod ranged;
#[cfg(feature = "unparse")]
mod unparse;
#[cfg(feature = "malachite-bigint")]
pub use malachite_bigint as bigint;
#[cfg(feature = "num-bigint")]
pub use num_bigint as bigint;
pub use builtin::*;
pub use generic::*;
pub use ranged::Ranged;

View file

@ -55,7 +55,7 @@ impl<U> crate::fold::Fold<U> for ConstantOptimizer {
#[cfg(test)]
mod tests {
use num_bigint::BigInt;
use crate::bigint::BigInt;
use rustpython_parser_core::text_size::TextRange;
#[cfg(feature = "constant-optimization")]