[Python-checkins] cpython (merge 3.4 -> default): (Merge 3.4) asyncio: Fix pyflakes errors

victor.stinner python-checkins at python.org
Wed Jun 18 03:28:27 CEST 2014


http://hg.python.org/cpython/rev/c9bee963557b
changeset:   91262:c9bee963557b
parent:      91260:f574c7b18279
parent:      91261:a1e09a563ac4
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Wed Jun 18 03:27:28 2014 +0200
summary:
  (Merge 3.4) asyncio: Fix pyflakes errors

- Add a missing import
- Remove an unused import
- Remove unused variables

files:
  Doc/library/asyncio-eventloop.rst             |  4 ++++
  Lib/test/test_asyncio/test_selector_events.py |  5 +----
  Lib/test/test_asyncio/test_tasks.py           |  1 -
  Lib/test/test_asyncio/test_windows_events.py  |  1 +
  4 files changed, 6 insertions(+), 5 deletions(-)


diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -588,10 +588,14 @@
 
    Get the debug mode (:class:`bool`) of the event loop, ``False`` by default.
 
+   .. versionadded:: 3.4.2
+
 .. method:: BaseEventLoop.set_debug(enabled: bool)
 
    Set the debug mode of the event loop.
 
+   .. versionadded:: 3.4.2
+
 .. seealso::
 
    The :ref:`Develop with asyncio <asyncio-dev>` section.
diff --git a/Lib/test/test_asyncio/test_selector_events.py b/Lib/test/test_asyncio/test_selector_events.py
--- a/Lib/test/test_asyncio/test_selector_events.py
+++ b/Lib/test/test_asyncio/test_selector_events.py
@@ -108,10 +108,7 @@
         self.assertRaises(RuntimeError, self.loop.add_writer, fd, callback)
 
     def test_close_no_selector(self):
-        ssock = self.loop._ssock
-        csock = self.loop._csock
-        remove_reader = self.loop.remove_reader = mock.Mock()
-
+        self.loop.remove_reader = mock.Mock()
         self.loop._selector.close()
         self.loop._selector = None
         self.loop.close()
diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -1,6 +1,5 @@
 """Tests for tasks.py."""
 
-import gc
 import os.path
 import sys
 import types
diff --git a/Lib/test/test_asyncio/test_windows_events.py b/Lib/test/test_asyncio/test_windows_events.py
--- a/Lib/test/test_asyncio/test_windows_events.py
+++ b/Lib/test/test_asyncio/test_windows_events.py
@@ -9,6 +9,7 @@
 
 import asyncio
 from asyncio import _overlapped
+from asyncio import test_utils
 from asyncio import windows_events
 
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list