[Python-checkins] cpython (merge 3.6 -> default): Merge from 3.6.

serhiy.storchaka python-checkins at python.org
Wed Dec 7 06:32:24 EST 2016


https://hg.python.org/cpython/rev/5cb2e7f8d02a
changeset:   105512:5cb2e7f8d02a
parent:      105509:450461b8b776
parent:      105511:c4f39b6f3176
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Wed Dec 07 13:32:09 2016 +0200
summary:
  Merge from 3.6.

files:
  Lib/_pyio.py            |  2 +-
  Modules/_io/_iomodule.c |  2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Lib/_pyio.py b/Lib/_pyio.py
--- a/Lib/_pyio.py
+++ b/Lib/_pyio.py
@@ -277,7 +277,7 @@
 try:
     UnsupportedOperation = io.UnsupportedOperation
 except AttributeError:
-    class UnsupportedOperation(ValueError, OSError):
+    class UnsupportedOperation(OSError, ValueError):
         pass
 
 
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c
--- a/Modules/_io/_iomodule.c
+++ b/Modules/_io/_iomodule.c
@@ -683,7 +683,7 @@
     /* 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);

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list