explicitly set UnsupportedOperation's module rather than relying on incorrect globals on startup (closes #14745)

This commit is contained in:
Benjamin Peterson 2012-05-07 22:19:42 -04:00
parent 106802547c
commit bbf83933c5
1 changed files with 3 additions and 0 deletions

View File

@ -67,6 +67,9 @@ from _io import (DEFAULT_BUFFER_SIZE, BlockingIOError, UnsupportedOperation,
OpenWrapper = _io.open # for compatibility with _pyio
# Pretend this exception was created here.
UnsupportedOperation.__module__ = "io"
# for seek()
SEEK_SET = 0
SEEK_CUR = 1