summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/__init__.py15
-rw-r--r--Lib/asyncio/selector_events.py2
-rw-r--r--Lib/asyncio/test_utils.py2
-rw-r--r--Lib/asyncio/unix_events.py2
-rw-r--r--Lib/asyncio/windows_events.py2
5 files changed, 4 insertions, 19 deletions
diff --git a/Lib/asyncio/__init__.py b/Lib/asyncio/__init__.py
index 011466b..1ee1b25 100644
--- a/Lib/asyncio/__init__.py
+++ b/Lib/asyncio/__init__.py
@@ -2,21 +2,6 @@
import sys
-# The selectors module is in the stdlib in Python 3.4 but not in 3.3.
-# Do this first, so the other submodules can use "from . import selectors".
-# Prefer asyncio/selectors.py over the stdlib one, as ours may be newer.
-try:
- from . import selectors
-except ImportError:
- import selectors # Will also be exported.
-
-if sys.platform == 'win32':
- # Similar thing for _overlapped.
- try:
- from . import _overlapped
- except ImportError:
- import _overlapped # Will also be exported.
-
# This relies on each of the submodules having an __all__ variable.
from .base_events import *
from .coroutines import *
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py
index ef6f0ac..3639466 100644
--- a/Lib/asyncio/selector_events.py
+++ b/Lib/asyncio/selector_events.py
@@ -9,6 +9,7 @@ __all__ = ['BaseSelectorEventLoop']
import collections
import errno
import functools
+import selectors
import socket
import warnings
import weakref
@@ -21,7 +22,6 @@ from . import base_events
from . import constants
from . import events
from . import futures
-from . import selectors
from . import transports
from . import sslproto
from .coroutines import coroutine
diff --git a/Lib/asyncio/test_utils.py b/Lib/asyncio/test_utils.py
index c3ddfe3..f797b2f 100644
--- a/Lib/asyncio/test_utils.py
+++ b/Lib/asyncio/test_utils.py
@@ -6,6 +6,7 @@ import io
import logging
import os
import re
+import selectors
import socket
import socketserver
import sys
@@ -28,7 +29,6 @@ except ImportError: # pragma: no cover
from . import base_events
from . import events
from . import futures
-from . import selectors
from . import tasks
from .coroutines import coroutine
from .log import logger
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
index 94157f8..06bcdcc 100644
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/asyncio/unix_events.py
@@ -2,6 +2,7 @@
import errno
import os
+import selectors
import signal
import socket
import stat
@@ -18,7 +19,6 @@ from . import coroutines
from . import events
from . import futures
from . import selector_events
-from . import selectors
from . import transports
from .coroutines import coroutine
from .log import logger
diff --git a/Lib/asyncio/windows_events.py b/Lib/asyncio/windows_events.py
index 031e3f1..de41e64 100644
--- a/Lib/asyncio/windows_events.py
+++ b/Lib/asyncio/windows_events.py
@@ -1,5 +1,6 @@
"""Selector and proactor event loops for Windows."""
+import _overlapped
import _winapi
import errno
import math
@@ -14,7 +15,6 @@ from . import proactor_events
from . import selector_events
from . import tasks
from . import windows_utils
-from . import _overlapped
from .coroutines import coroutine
from .log import logger