[Python-checkins] bpo-43927: Change 'IOError' to 'OSError' (GH-26289)

terryjreedy webhook-mailer at python.org
Fri May 21 13:54:06 EDT 2021


https://github.com/python/cpython/commit/2f47d8dcc735234bf9c7f92fbdacd8c5a6ee7761
commit: 2f47d8dcc735234bf9c7f92fbdacd8c5a6ee7761
branch: main
author: Terry Jan Reedy <tjreedy at udel.edu>
committer: terryjreedy <tjreedy at udel.edu>
date: 2021-05-21T13:54:01-04:00
summary:

bpo-43927: Change 'IOError' to 'OSError' (GH-26289)

This is the last remaining instance, at least for this chapter, in 3.10 & 3.11.

files:
M Doc/tutorial/errors.rst

diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst
index cd5fc878f9c946..27e39dfe257716 100644
--- a/Doc/tutorial/errors.rst
+++ b/Doc/tutorial/errors.rst
@@ -305,7 +305,7 @@ disabled by using ``from None`` idiom:
 
     >>> try:
     ...     open('database.sqlite')
-    ... except IOError:
+    ... except OSError:
     ...     raise RuntimeError from None
     ...
     Traceback (most recent call last):



More information about the Python-checkins mailing list