summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/queue.py5
-rw-r--r--Lib/sched.py5
-rw-r--r--Lib/socketserver.py5
-rw-r--r--Lib/subprocess.py5
-rw-r--r--Lib/telnetlib.py5
-rw-r--r--Lib/test/test_selectors.py5
-rw-r--r--Lib/threading.py5
-rwxr-xr-xLib/trace.py5
8 files changed, 8 insertions, 32 deletions
diff --git a/Lib/queue.py b/Lib/queue.py
index 3cee36b..572425e 100644
--- a/Lib/queue.py
+++ b/Lib/queue.py
@@ -6,10 +6,7 @@ except ImportError:
import dummy_threading as threading
from collections import deque
from heapq import heappush, heappop
-try:
- from time import monotonic as time
-except ImportError:
- from time import time
+from time import monotonic as time
__all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue']
diff --git a/Lib/sched.py b/Lib/sched.py
index 2e6b00a..409d126 100644
--- a/Lib/sched.py
+++ b/Lib/sched.py
@@ -35,10 +35,7 @@ try:
import threading
except ImportError:
import dummy_threading as threading
-try:
- from time import monotonic as _time
-except ImportError:
- from time import time as _time
+from time import monotonic as _time
__all__ = ["scheduler"]
diff --git a/Lib/socketserver.py b/Lib/socketserver.py
index b585640..3d58590 100644
--- a/Lib/socketserver.py
+++ b/Lib/socketserver.py
@@ -136,10 +136,7 @@ try:
import threading
except ImportError:
import dummy_threading as threading
-try:
- from time import monotonic as time
-except ImportError:
- from time import time as time
+from time import monotonic as time
__all__ = ["TCPServer","UDPServer","ForkingUDPServer","ForkingTCPServer",
"ThreadingUDPServer","ThreadingTCPServer","BaseRequestHandler",
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 6dfa40b..bb7d0dc 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -365,10 +365,7 @@ import signal
import builtins
import warnings
import errno
-try:
- from time import monotonic as _time
-except ImportError:
- from time import time as _time
+from time import monotonic as _time
# Exception classes used by this module.
class SubprocessError(Exception): pass
diff --git a/Lib/telnetlib.py b/Lib/telnetlib.py
index 0cacac8..eebb952 100644
--- a/Lib/telnetlib.py
+++ b/Lib/telnetlib.py
@@ -36,10 +36,7 @@ To do:
import sys
import socket
import selectors
-try:
- from time import monotonic as _time
-except ImportError:
- from time import time as _time
+from time import monotonic as _time
__all__ = ["Telnet"]
diff --git a/Lib/test/test_selectors.py b/Lib/test/test_selectors.py
index c2eba15..544ea7b 100644
--- a/Lib/test/test_selectors.py
+++ b/Lib/test/test_selectors.py
@@ -8,10 +8,7 @@ from test import support
from time import sleep
import unittest
import unittest.mock
-try:
- from time import monotonic as time
-except ImportError:
- from time import time as time
+from time import monotonic as time
try:
import resource
except ImportError:
diff --git a/Lib/threading.py b/Lib/threading.py
index 66620a9..2ce037e 100644
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -3,10 +3,7 @@
import sys as _sys
import _thread
-try:
- from time import monotonic as _time
-except ImportError:
- from time import time as _time
+from time import monotonic as _time
from traceback import format_exc as _format_exc
from _weakrefset import WeakSet
from itertools import islice as _islice
diff --git a/Lib/trace.py b/Lib/trace.py
index 1c888ac..fe84973 100755
--- a/Lib/trace.py
+++ b/Lib/trace.py
@@ -59,10 +59,7 @@ import gc
import dis
import pickle
from warnings import warn as _warn
-try:
- from time import monotonic as _time
-except ImportError:
- from time import time as _time
+from time import monotonic as _time
try:
import threading