Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

More cspell fixes #5670

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 1 .cspell.dict/rust-more.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ modpow
msvc
muldiv
nanos
nonoverlapping
objclass
peekable
powc
Expand Down
9 changes: 7 additions & 2 deletions 9 .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
// words - list of words to be always considered correct
"words": [
"RUSTPYTHONPATH",
youknowone marked this conversation as resolved.
Show resolved Hide resolved
// RustPython
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is meaning the terms below are not coming from python or cpython, but rustpython-original terms

// RustPython terms
"aiterable",
"alnum",
"baseclass",
Expand All @@ -67,6 +67,7 @@
"GetSet",
"groupref",
"internable",
"lossily",
"makeunicodedata",
"miri",
"notrace",
Expand Down Expand Up @@ -96,6 +97,7 @@
"PyResult",
"pyslot",
"PyStaticMethod",
"pystone",
"pystr",
"pystruct",
"pystructseq",
Expand All @@ -104,13 +106,16 @@
"richcompare",
"RustPython",
"struc",
// plural of summand
"summands",
"sysmodule",
"tracebacks",
"typealiases",
"Unconstructible",
"unconstructible",
"unhashable",
"uninit",
"unraisable",
"unresizable",
"wasi",
"zelf",
// unix
Expand Down
4 changes: 2 additions & 2 deletions 4 Lib/test/test_bytes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion 2 Lib/test/test_sqlite3/test_dbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions 6 benches/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -41,7 +41,7 @@ pub fn benchmark_file_execution(group: &mut BenchmarkGroup<WallTime>, 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)
});
}

Expand Down Expand Up @@ -77,7 +77,7 @@ pub fn benchmark_pystone(group: &mut BenchmarkGroup<WallTime>, 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)
});
}
}
Expand Down
4 changes: 2 additions & 2 deletions 4 benches/microbenchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ fn cpy_compile_code<'a>(
compile.call1((code, name, "exec"))?.extract()
}

fn bench_rustpy_code(group: &mut BenchmarkGroup<WallTime>, bench: &MicroBenchmark) {
fn bench_rustpython_code(group: &mut BenchmarkGroup<WallTime>, bench: &MicroBenchmark) {
let mut settings = Settings::default();
settings.path_list.push("Lib/".to_string());
settings.write_bytecode = false;
Expand Down Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion 2 common/src/float_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion 2 common/src/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pub fn hash_float(value: f64) -> Option<PyHash> {
};
}

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.
Expand Down
2 changes: 1 addition & 1 deletion 2 stdlib/src/math.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions 6 wasm/demo/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion 2 wasm/lib/src/js_module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
6 changes: 3 additions & 3 deletions 6 wasm/notebook/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion 2 wtf8/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.