Merge from 3.5.

This commit is contained in:
Serhiy Storchaka 2016-12-07 13:31:47 +02:00
commit 427f10b442
2 changed files with 2 additions and 2 deletions

View File

@ -277,7 +277,7 @@ class OpenWrapper:
try:
UnsupportedOperation = io.UnsupportedOperation
except AttributeError:
class UnsupportedOperation(ValueError, OSError):
class UnsupportedOperation(OSError, ValueError):
pass

View File

@ -683,7 +683,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);