@@ -20,6 +20,11 @@ api. The normal API deals only with ASCII characters and is of limited use
2020for internationalized applications. The wide char API should be used where
2121ever possible
2222
23+ .. versionchanged :: 3.3
24+ Operations in this module now raise :exc: `OSError ` where :exc: `IOError `
25+ was raised.
26+
27+
2328.. _msvcrt-files :
2429
2530File Operations
@@ -29,7 +34,7 @@ File Operations
2934.. function :: locking(fd, mode, nbytes)
3035
3136 Lock part of a file based on file descriptor *fd * from the C runtime. Raises
32- :exc: `IOError ` on failure. The locked region of the file extends from the
37+ :exc: `OSError ` on failure. The locked region of the file extends from the
3338 current file position for *nbytes * bytes, and may continue beyond the end of the
3439 file. *mode * must be one of the :const: `LK_\* ` constants listed below. Multiple
3540 regions in a file may be locked at the same time, but may not overlap. Adjacent
@@ -41,13 +46,13 @@ File Operations
4146
4247 Locks the specified bytes. If the bytes cannot be locked, the program
4348 immediately tries again after 1 second. If, after 10 attempts, the bytes cannot
44- be locked, :exc: `IOError ` is raised.
49+ be locked, :exc: `OSError ` is raised.
4550
4651
4752.. data :: LK_NBLCK
4853 LK_NBRLCK
4954
50- Locks the specified bytes. If the bytes cannot be locked, :exc: `IOError ` is
55+ Locks the specified bytes. If the bytes cannot be locked, :exc: `OSError ` is
5156 raised.
5257
5358
@@ -73,7 +78,7 @@ File Operations
7378
7479.. function :: get_osfhandle(fd)
7580
76- Return the file handle for the file descriptor *fd *. Raises :exc: `IOError ` if
81+ Return the file handle for the file descriptor *fd *. Raises :exc: `OSError ` if
7782 *fd * is not recognized.
7883
7984
@@ -144,4 +149,4 @@ Other Functions
144149.. function :: heapmin()
145150
146151 Force the :c:func: `malloc ` heap to clean itself up and return unused blocks to
147- the operating system. On failure, this raises :exc: `IOError `.
152+ the operating system. On failure, this raises :exc: `OSError `.
0 commit comments