forked from RustPython/RustPython
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Problem: The isatty() method does not check if the file is closed before returning False. CPython raises ValueError when called on closed files.
RustPython Location: crates/vm/src/stdlib/io.rs:480-482
#[pymethod]
fn isatty(_self: PyObjectRef) -> bool {
false // ✗ Missing closed check
}CPython 3.14 Reference: Modules/_io/iobase.c:538-545
static PyObject *
_io__IOBase_isatty_impl(PyObject *self)
{
if (iobase_check_closed(self)) // ✓ Checks if closed
return NULL;
Py_RETURN_FALSE;
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels