From 64d750b36bbc60c354b9d486ae578c729a74afd9 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 18 Jun 2014 03:25:23 +0200 Subject: [PATCH] asyncio: Fix pyflakes errors - Add a missing import - Remove an unused import - Remove unused variables --- 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 index 7717b7a1c71..480a8e18575 100644 --- a/Doc/library/asyncio-eventloop.rst +++ b/Doc/library/asyncio-eventloop.rst @@ -588,10 +588,14 @@ Debug mode 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 ` section. diff --git a/Lib/test/test_asyncio/test_selector_events.py b/Lib/test/test_asyncio/test_selector_events.py index b1148d2e36d..7c84f03f9da 100644 --- a/Lib/test/test_asyncio/test_selector_events.py +++ b/Lib/test/test_asyncio/test_selector_events.py @@ -108,10 +108,7 @@ class BaseSelectorEventLoopTests(test_utils.TestCase): 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 index 0ed2f941b55..e95c7dcbc82 100644 --- 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 index ca79c437c7b..4ab56e6ce61 100644 --- a/Lib/test/test_asyncio/test_windows_events.py +++ b/Lib/test/test_asyncio/test_windows_events.py @@ -9,6 +9,7 @@ import _winapi import asyncio from asyncio import _overlapped +from asyncio import test_utils from asyncio import windows_events