Kaydet (Commit) 606ab86c authored tarafından Serhiy Storchaka's avatar Serhiy Storchaka

Change order of io.UnsupportedOperation base classes.

This makes tests passing after changes by issue #5322.
üst 5adfac2c
......@@ -276,7 +276,7 @@ class OpenWrapper:
try:
UnsupportedOperation = io.UnsupportedOperation
except AttributeError:
class UnsupportedOperation(ValueError, OSError):
class UnsupportedOperation(OSError, ValueError):
pass
......
......@@ -654,7 +654,7 @@ PyInit__io(void)
/* UnsupportedOperation inherits from ValueError and IOError */
state->unsupported_operation = PyObject_CallFunction(
(PyObject *)&PyType_Type, "s(OO){}",
"UnsupportedOperation", PyExc_ValueError, PyExc_IOError);
"UnsupportedOperation", PyExc_OSError, PyExc_ValueError);
if (state->unsupported_operation == NULL)
goto fail;
Py_INCREF(state->unsupported_operation);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment