Skip to content

Commit 0a09d8c

Browse files
committed
coderabbit fixes
1 parent 6288b8d commit 0a09d8c

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ That keeps calls independent and easy to use from Rust async code, but it is not
101101
the same as a shared long-running Python event loop. If you need shared Python
102102
async state, keep it in Python globals or wrap the behavior in a Python function.
103103

104-
`call_async_function` is only available with the default PyO3 backend. The
105-
RustPython backend currently reports async function calls as unsupported.
104+
`call_async_function` is part of the public API for both backends, but only the
105+
default PyO3 backend provides runtime support for awaiting Python coroutines.
106+
With the RustPython backend, calling `call_async_function` returns an unsupported
107+
error at runtime.
106108

107109
### Thread Safety
108110

src/rustpython_runner.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,7 @@ fn print_err_msg(vm: &VirtualMachine, error: PyRef<PyBaseException>) -> String {
215215
println!("Traceback (most recent call last):");
216216
for trace in tb.iter() {
217217
let file = trace.frame.code.source_path.as_str();
218-
let original_line = trace.lineno.get();
219-
let line = if file == "main.py" {
220-
original_line - 2 // sys.path import has 2 additional lines
221-
} else {
222-
original_line
223-
};
218+
let line = trace.lineno.get();
224219
println!(
225220
" File \"{file}\", line {line}, in {}",
226221
trace.frame.code.obj_name

0 commit comments

Comments
 (0)