Kaydet (Commit) deb75f57 authored tarafından Christian Heimes's avatar Christian Heimes

Removed some unused imports to decrease the amount of loaded modules during startup.

Added fallback to _dummy_thread for OSs w/o thread support.
üst 34ed9f7c
......@@ -60,8 +60,12 @@ import abc
import sys
import codecs
import _fileio
import warnings
from _thread import allocate_lock as Lock
# Import _thread instead of threading to reduce startup cost
try:
from _thread import allocate_lock as Lock
except ImportError:
from _dummy_thread import allocate_lock as Lock
# open() uses st_blksize whenever we can
DEFAULT_BUFFER_SIZE = 8 * 1024 # bytes
......
......@@ -5,7 +5,6 @@
# See bug 683658.
import linecache
import sys
import types
__all__ = ["warn", "showwarning", "formatwarning", "filterwarnings",
"resetwarnings"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment