diff --git a/.cspell.dict/rust-more.txt b/.cspell.dict/rust-more.txt index 99e87e532c..e92f1ff8c1 100644 --- a/.cspell.dict/rust-more.txt +++ b/.cspell.dict/rust-more.txt @@ -43,6 +43,7 @@ modpow msvc muldiv nanos +nonoverlapping objclass peekable powc diff --git a/.cspell.json b/.cspell.json index caa53a2879..69ace83483 100644 --- a/.cspell.json +++ b/.cspell.json @@ -47,7 +47,7 @@ // words - list of words to be always considered correct "words": [ "RUSTPYTHONPATH", - // RustPython + // RustPython terms "aiterable", "alnum", "baseclass", @@ -67,6 +67,7 @@ "GetSet", "groupref", "internable", + "lossily", "makeunicodedata", "miri", "notrace", @@ -96,6 +97,7 @@ "PyResult", "pyslot", "PyStaticMethod", + "pystone", "pystr", "pystruct", "pystructseq", @@ -104,13 +106,16 @@ "richcompare", "RustPython", "struc", + // plural of summand + "summands", "sysmodule", "tracebacks", "typealiases", - "Unconstructible", + "unconstructible", "unhashable", "uninit", "unraisable", + "unresizable", "wasi", "zelf", // unix diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index baf84642ee..cc1affc669 100644 --- a/Lib/test/test_bytes.py +++ b/Lib/test/test_bytes.py @@ -1992,7 +1992,7 @@ def test_join(self): s3 = s1.join([b"abcd"]) self.assertIs(type(s3), self.basetype) - @unittest.skip("TODO: RUSTPYHON, Fails on ByteArraySubclassWithSlotsTest") + @unittest.skip("TODO: RUSTPYTHON, Fails on ByteArraySubclassWithSlotsTest") def test_pickle(self): a = self.type2test(b"abcd") a.x = 10 @@ -2007,7 +2007,7 @@ def test_pickle(self): self.assertEqual(type(a.z), type(b.z)) self.assertFalse(hasattr(b, 'y')) - @unittest.skip("TODO: RUSTPYHON, Fails on ByteArraySubclassWithSlotsTest") + @unittest.skip("TODO: RUSTPYTHON, Fails on ByteArraySubclassWithSlotsTest") def test_copy(self): a = self.type2test(b"abcd") a.x = 10 diff --git a/Lib/test/test_sqlite3/test_dbapi.py b/Lib/test/test_sqlite3/test_dbapi.py index bbc151fcb7..56cd8f8a68 100644 --- a/Lib/test/test_sqlite3/test_dbapi.py +++ b/Lib/test/test_sqlite3/test_dbapi.py @@ -591,7 +591,7 @@ def test_connection_bad_reinit(self): ((v,) for v in range(3))) -@unittest.skip("TODO: RUSTPYHON") +@unittest.skip("TODO: RUSTPYTHON") class UninitialisedConnectionTests(unittest.TestCase): def setUp(self): self.cx = sqlite.Connection.__new__(sqlite.Connection) diff --git a/benches/execution.rs b/benches/execution.rs index d38dab0890..88e5e3650b 100644 --- a/benches/execution.rs +++ b/benches/execution.rs @@ -18,7 +18,7 @@ fn bench_cpython_code(b: &mut Bencher, source: &str) { }) } -fn bench_rustpy_code(b: &mut Bencher, name: &str, source: &str) { +fn bench_rustpython_code(b: &mut Bencher, name: &str, source: &str) { // NOTE: Take long time. let mut settings = Settings::default(); settings.path_list.push("Lib/".to_string()); @@ -41,7 +41,7 @@ pub fn benchmark_file_execution(group: &mut BenchmarkGroup, name: &str bench_cpython_code(b, contents) }); group.bench_function(BenchmarkId::new(name, "rustpython"), |b| { - bench_rustpy_code(b, name, contents) + bench_rustpython_code(b, name, contents) }); } @@ -77,7 +77,7 @@ pub fn benchmark_pystone(group: &mut BenchmarkGroup, contents: String) bench_cpython_code(b, code_str) }); group.bench_function(BenchmarkId::new("rustpython", idx), |b| { - bench_rustpy_code(b, "pystone", code_str) + bench_rustpython_code(b, "pystone", code_str) }); } } diff --git a/benches/microbenchmarks.rs b/benches/microbenchmarks.rs index 6f41f00d6c..c62ecf239a 100644 --- a/benches/microbenchmarks.rs +++ b/benches/microbenchmarks.rs @@ -104,7 +104,7 @@ fn cpy_compile_code<'a>( compile.call1((code, name, "exec"))?.extract() } -fn bench_rustpy_code(group: &mut BenchmarkGroup, bench: &MicroBenchmark) { +fn bench_rustpython_code(group: &mut BenchmarkGroup, bench: &MicroBenchmark) { let mut settings = Settings::default(); settings.path_list.push("Lib/".to_string()); settings.write_bytecode = false; @@ -169,7 +169,7 @@ pub fn run_micro_benchmark(c: &mut Criterion, benchmark: MicroBenchmark) { let mut group = c.benchmark_group("microbenchmarks"); bench_cpython_code(&mut group, &benchmark); - bench_rustpy_code(&mut group, &benchmark); + bench_rustpython_code(&mut group, &benchmark); group.finish(); } diff --git a/common/src/float_ops.rs b/common/src/float_ops.rs index 46e2d57067..b3c90d0ac6 100644 --- a/common/src/float_ops.rs +++ b/common/src/float_ops.rs @@ -2,7 +2,7 @@ use malachite_bigint::{BigInt, ToBigInt}; use num_traits::{Float, Signed, ToPrimitive, Zero}; use std::f64; -pub fn ufrexp(value: f64) -> (f64, i32) { +pub fn decompose_float(value: f64) -> (f64, i32) { if 0.0 == value { (0.0, 0i32) } else { diff --git a/common/src/hash.rs b/common/src/hash.rs index 1ae561650c..88af9b6f56 100644 --- a/common/src/hash.rs +++ b/common/src/hash.rs @@ -97,7 +97,7 @@ pub fn hash_float(value: f64) -> Option { }; } - let frexp = super::float_ops::ufrexp(value); + let frexp = super::float_ops::decompose_float(value); // process 28 bits at a time; this should work well both for binary // and hexadecimal floating point. diff --git a/stdlib/src/math.rs b/stdlib/src/math.rs index a7da60949c..4854bdd75e 100644 --- a/stdlib/src/math.rs +++ b/stdlib/src/math.rs @@ -557,7 +557,7 @@ mod math { fn frexp(x: ArgIntoFloat) -> (f64, i32) { let value = *x; if value.is_finite() { - let (m, exp) = float_ops::ufrexp(value); + let (m, exp) = float_ops::decompose_float(value); (m * value.signum(), exp) } else { (value, 0) diff --git a/wasm/demo/src/index.js b/wasm/demo/src/index.js index 1af847d59d..0b568fa1d9 100644 --- a/wasm/demo/src/index.js +++ b/wasm/demo/src/index.js @@ -13,10 +13,10 @@ let rp; // A dependency graph that contains any wasm must be imported asynchronously. import('rustpython') - .then((rustpy) => { - rp = rustpy; + .then((rustpython) => { + rp = rustpython; // so people can play around with it - window.rp = rustpy; + window.rp = rustpython; onReady(); }) .catch((e) => { diff --git a/wasm/lib/src/js_module.rs b/wasm/lib/src/js_module.rs index f159c467d0..5a3ac4025b 100644 --- a/wasm/lib/src/js_module.rs +++ b/wasm/lib/src/js_module.rs @@ -575,7 +575,7 @@ mod _js { Some(prom) => { if val.is_some() { Err(vm.new_type_error( - "can't send non-None value to an awaitpromise".to_owned(), + "can't send non-None value to an AwaitPromise".to_owned(), )) } else { Ok(PyIterReturn::Return(prom)) diff --git a/wasm/notebook/src/index.js b/wasm/notebook/src/index.js index 422bc4d0d6..64b058a9ac 100644 --- a/wasm/notebook/src/index.js +++ b/wasm/notebook/src/index.js @@ -34,10 +34,10 @@ let rp; // A dependency graph that contains any wasm must be imported asynchronously. import('rustpython') - .then((rustpy) => { - rp = rustpy; + .then((rustpython) => { + rp = rustpython; // so people can play around with it - window.rp = rustpy; + window.rp = rustpython; onReady(); }) .catch((e) => { diff --git a/wtf8/src/lib.rs b/wtf8/src/lib.rs index 3ba28a5146..73b5168453 100644 --- a/wtf8/src/lib.rs +++ b/wtf8/src/lib.rs @@ -757,7 +757,7 @@ impl Wtf8 { /// Create a WTF-8 slice from a WTF-8 byte slice. // - // whooops! using WTF-8 for interchange! + // whoops! using WTF-8 for interchange! #[inline] pub fn from_bytes(b: &[u8]) -> Option<&Self> { let mut rest = b;