Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bbf8393

Browse files
committed
explicitly set UnsupportedOperation's module rather than relying on incorrect globals on startup (closes #14745)
1 parent 1068025 commit bbf8393

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/io.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@
6767

6868
OpenWrapper = _io.open # for compatibility with _pyio
6969

70+
# Pretend this exception was created here.
71+
UnsupportedOperation.__module__ = "io"
72+
7073
# for seek()
7174
SEEK_SET = 0
7275
SEEK_CUR = 1

0 commit comments

Comments
 (0)