Commit b4c93889 authored by Victor Stinner's avatar Victor Stinner

asyncio: remove unused imports and unused variables noticed by pyflakes

parent 6f24d83a
...@@ -9,12 +9,9 @@ __all__ = ['AbstractEventLoopPolicy', ...@@ -9,12 +9,9 @@ __all__ = ['AbstractEventLoopPolicy',
] ]
import subprocess import subprocess
import sys
import threading import threading
import socket import socket
from .log import logger
class Handle: class Handle:
"""Object returned by callback registration methods.""" """Object returned by callback registration methods."""
......
...@@ -11,7 +11,6 @@ import sys ...@@ -11,7 +11,6 @@ import sys
import traceback import traceback
from . import events from . import events
from .log import logger
# States for Future. # States for Future.
_PENDING = 'PENDING' _PENDING = 'PENDING'
......
...@@ -7,7 +7,6 @@ __all__ = ['coroutine', 'Task', ...@@ -7,7 +7,6 @@ __all__ = ['coroutine', 'Task',
'gather', 'shield', 'gather', 'shield',
] ]
import collections
import concurrent.futures import concurrent.futures
import functools import functools
import inspect import inspect
...@@ -486,7 +485,6 @@ def as_completed(fs, *, loop=None, timeout=None): ...@@ -486,7 +485,6 @@ def as_completed(fs, *, loop=None, timeout=None):
if isinstance(fs, futures.Future) or iscoroutine(fs): if isinstance(fs, futures.Future) or iscoroutine(fs):
raise TypeError("expect a list of futures, not %s" % type(fs).__name__) raise TypeError("expect a list of futures, not %s" % type(fs).__name__)
loop = loop if loop is not None else events.get_event_loop() loop = loop if loop is not None else events.get_event_loop()
deadline = None if timeout is None else loop.time() + timeout
todo = {async(f, loop=loop) for f in set(fs)} todo = {async(f, loop=loop) for f in set(fs)}
from .queues import Queue # Import here to avoid circular import problem. from .queues import Queue # Import here to avoid circular import problem.
done = Queue(loop=loop) done = Queue(loop=loop)
......
...@@ -15,7 +15,7 @@ import unittest ...@@ -15,7 +15,7 @@ import unittest
import unittest.mock import unittest.mock
from http.server import HTTPServer from http.server import HTTPServer
from wsgiref.simple_server import make_server, WSGIRequestHandler, WSGIServer from wsgiref.simple_server import WSGIRequestHandler, WSGIServer
try: try:
import ssl import ssl
......
...@@ -15,7 +15,6 @@ from . import base_events ...@@ -15,7 +15,6 @@ from . import base_events
from . import base_subprocess from . import base_subprocess
from . import constants from . import constants
from . import events from . import events
from . import protocols
from . import selector_events from . import selector_events
from . import tasks from . import tasks
from . import transports from . import transports
......
...@@ -5,7 +5,6 @@ import errno ...@@ -5,7 +5,6 @@ import errno
import math import math
import socket import socket
import struct import struct
import subprocess
import weakref import weakref
from . import events from . import events
......
...@@ -5,9 +5,8 @@ This module allows high-level and efficient I/O multiplexing, built upon the ...@@ -5,9 +5,8 @@ This module allows high-level and efficient I/O multiplexing, built upon the
""" """
from abc import ABCMeta, abstractmethod, abstractproperty from abc import ABCMeta, abstractmethod
from collections import namedtuple, Mapping from collections import namedtuple, Mapping
import functools
import math import math
import select import select
import sys import sys
......
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