make WindowsError an alias of OSError (new in Python 3.3) (#5032)

make WindowsError an alias of OSError (new in Python 3.3)
This commit is contained in:
Akuli
2021-02-19 16:45:40 +02:00
committed by GitHub
parent fffa66ff97
commit 1184e6e42b

View File

@@ -1292,9 +1292,12 @@ class OSError(Exception):
# filename, filename2 are actually Union[str, bytes, None]
filename: Any
filename2: Any
if sys.platform == "win32":
winerror: int
EnvironmentError = OSError
IOError = OSError
WindowsError = OSError
class ArithmeticError(_StandardError): ...
class AssertionError(_StandardError): ...
@@ -1334,9 +1337,6 @@ class IndexError(LookupError): ...
class KeyError(LookupError): ...
class UnboundLocalError(NameError): ...
class WindowsError(OSError):
winerror: int
class BlockingIOError(OSError):
characters_written: int