[Python-checkins] cpython (3.4): asyncio: remove unused imports and unused variables noticed by pyflakes

larry.hastings python-checkins at python.org
Mon Mar 17 07:32:30 CET 2014


http://hg.python.org/cpython/rev/9ac04fa2a354
changeset: 89748:9ac04fa2a354
branch: 3.4
user: Victor Stinner <victor.stinner at gmail.com>
date: Thu Feb 20 10:37:27 2014 +0100
summary:
 asyncio: remove unused imports and unused variables noticed by pyflakes
files:
 Lib/asyncio/events.py | 3 ---
 Lib/asyncio/futures.py | 1 -
 Lib/asyncio/tasks.py | 2 --
 Lib/asyncio/test_utils.py | 2 +-
 Lib/asyncio/unix_events.py | 1 -
 Lib/asyncio/windows_events.py | 1 -
 Lib/selectors.py | 3 +--
 7 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py
--- a/Lib/asyncio/events.py
+++ b/Lib/asyncio/events.py
@@ -9,12 +9,9 @@
 ]
 
 import subprocess
-import sys
 import threading
 import socket
 
-from .log import logger
-
 
 class Handle:
 """Object returned by callback registration methods."""
diff --git a/Lib/asyncio/futures.py b/Lib/asyncio/futures.py
--- a/Lib/asyncio/futures.py
+++ b/Lib/asyncio/futures.py
@@ -11,7 +11,6 @@
 import traceback
 
 from . import events
-from .log import logger
 
 # States for Future.
 _PENDING = 'PENDING'
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -7,7 +7,6 @@
 'gather', 'shield',
 ]
 
-import collections
 import concurrent.futures
 import functools
 import inspect
@@ -486,7 +485,6 @@
 if isinstance(fs, futures.Future) or iscoroutine(fs):
 raise TypeError("expect a list of futures, not %s" % type(fs).__name__)
 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)}
 from .queues import Queue # Import here to avoid circular import problem.
 done = Queue(loop=loop)
diff --git a/Lib/asyncio/test_utils.py b/Lib/asyncio/test_utils.py
--- a/Lib/asyncio/test_utils.py
+++ b/Lib/asyncio/test_utils.py
@@ -15,7 +15,7 @@
 import unittest.mock
 
 from http.server import HTTPServer
-from wsgiref.simple_server import make_server, WSGIRequestHandler, WSGIServer
+from wsgiref.simple_server import WSGIRequestHandler, WSGIServer
 
 try:
 import ssl
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/asyncio/unix_events.py
@@ -15,7 +15,6 @@
 from . import base_subprocess
 from . import constants
 from . import events
-from . import protocols
 from . import selector_events
 from . import tasks
 from . import transports
diff --git a/Lib/asyncio/windows_events.py b/Lib/asyncio/windows_events.py
--- a/Lib/asyncio/windows_events.py
+++ b/Lib/asyncio/windows_events.py
@@ -5,7 +5,6 @@
 import math
 import socket
 import struct
-import subprocess
 import weakref
 
 from . import events
diff --git a/Lib/selectors.py b/Lib/selectors.py
--- a/Lib/selectors.py
+++ b/Lib/selectors.py
@@ -5,9 +5,8 @@
 """
 
 
-from abc import ABCMeta, abstractmethod, abstractproperty
+from abc import ABCMeta, abstractmethod
 from collections import namedtuple, Mapping
-import functools
 import math
 import select
 import sys
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /