forked from RustPython/RustPython
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Problem: The error message in fileno() method incorrectly refers to "truncate" instead of "fileno".
RustPython Location: crates/vm/src/stdlib/io.rs:437-438
#[pymethod]
fn fileno(zelf: PyObjectRef, vm: &VirtualMachine) -> PyResult {
_unsupported(vm, &zelf, "truncate") // ✗ Should be "fileno"
}CPython 3.14 Reference: Modules/_io/iobase.c:522-527
static PyObject *
_io__IOBase_fileno_impl(PyObject *self, PyTypeObject *cls)
{
_PyIO_State *state = get_io_state_by_cls(cls);
return iobase_unsupported(state, "fileno"); // ✓ Correct message
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels