[Python-checkins] cpython (3.4): asyncio: Fix spelling and typos.

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


http://hg.python.org/cpython/rev/590d6b59996c
changeset:   89734:590d6b59996c
branch:      3.4
user:        Yury Selivanov <yselivanov at sprymix.com>
date:        Tue Feb 18 22:27:48 2014 -0500
summary:
  asyncio: Fix spelling and typos.

Thanks to Vajrasky Kok for discovering some of them.

files:
  Lib/asyncio/events.py                     |  6 +++---
  Lib/asyncio/protocols.py                  |  2 +-
  Lib/asyncio/selector_events.py            |  2 +-
  Lib/asyncio/tasks.py                      |  2 +-
  Lib/asyncio/test_utils.py                 |  4 ++--
  Lib/asyncio/unix_events.py                |  4 ++--
  Lib/asyncio/windows_events.py             |  2 +-
  Lib/selectors.py                          |  2 +-
  Lib/test/test_asyncio/test_base_events.py |  2 +-
  Lib/test/test_asyncio/test_events.py      |  1 -
  Lib/test/test_asyncio/test_futures.py     |  2 +-
  Lib/test/test_asyncio/test_streams.py     |  2 +-
  Lib/test/test_asyncio/test_unix_events.py |  6 +++---
  13 files changed, 18 insertions(+), 19 deletions(-)


diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py
--- a/Lib/asyncio/events.py
+++ b/Lib/asyncio/events.py
@@ -235,7 +235,7 @@
                            sock=None, backlog=100, ssl=None):
         """A coroutine which creates a UNIX Domain Socket server.
 
-        The return valud is a Server object, which can be used to stop
+        The return value is a Server object, which can be used to stop
         the service.
 
         path is a str, representing a file systsem path to bind the
@@ -260,7 +260,7 @@
     # Pipes and subprocesses.
 
     def connect_read_pipe(self, protocol_factory, pipe):
-        """Register read pipe in eventloop.
+        """Register read pipe in event loop.
 
         protocol_factory should instantiate object with Protocol interface.
         pipe is file-like object already switched to nonblocking.
@@ -273,7 +273,7 @@
         raise NotImplementedError
 
     def connect_write_pipe(self, protocol_factory, pipe):
-        """Register write pipe in eventloop.
+        """Register write pipe in event loop.
 
         protocol_factory should instantiate object with BaseProtocol interface.
         Pipe is file-like object already switched to nonblocking.
diff --git a/Lib/asyncio/protocols.py b/Lib/asyncio/protocols.py
--- a/Lib/asyncio/protocols.py
+++ b/Lib/asyncio/protocols.py
@@ -114,7 +114,7 @@
     def pipe_data_received(self, fd, data):
         """Called when the subprocess writes data into stdout/stderr pipe.
 
-        fd is int file dascriptor.
+        fd is int file descriptor.
         data is bytes object.
         """
 
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py
--- a/Lib/asyncio/selector_events.py
+++ b/Lib/asyncio/selector_events.py
@@ -213,7 +213,7 @@
 
     def _sock_recv(self, fut, registered, sock, n):
         # _sock_recv() can add itself as an I/O callback if the operation can't
-        # be done immediatly. Don't use it directly, call sock_recv().
+        # be done immediately. Don't use it directly, call sock_recv().
         fd = sock.fileno()
         if registered:
             # Remove the callback early.  It should be rare that the
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -181,7 +181,7 @@
 
         The frames are always ordered from oldest to newest.
 
-        The optional limit gives the maximum nummber of frames to
+        The optional limit gives the maximum number of frames to
         return; by default all available frames are returned.  Its
         meaning differs depending on whether a stack or a traceback is
         returned: the newest frames of a stack are returned, but the
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
@@ -259,7 +259,7 @@
             when = yield ...
             ... = yield time_advance
 
-    Value retuned by yield is absolute time of next scheduled handler.
+    Value returned by yield is absolute time of next scheduled handler.
     Value passed to yield is time advance to move loop's time forward.
     """
 
@@ -369,7 +369,7 @@
     """A regex based str with a fuzzy __eq__.
 
     Use this helper with 'mock.assert_called_with', or anywhere
-    where a regexp comparison between strings is needed.
+    where a regex comparison between strings is needed.
 
     For instance:
        mock_call.assert_called_with(MockPattern('spam.*ham'))
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
@@ -1,4 +1,4 @@
-"""Selector eventloop for Unix with signal handling."""
+"""Selector event loop for Unix with signal handling."""
 
 import errno
 import fcntl
@@ -244,7 +244,7 @@
 
 class _UnixReadPipeTransport(transports.ReadTransport):
 
-    max_size = 256 * 1024  # max bytes we read in one eventloop iteration
+    max_size = 256 * 1024  # max bytes we read in one event loop iteration
 
     def __init__(self, loop, pipe, protocol, waiter=None, extra=None):
         super().__init__(extra)
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
@@ -1,4 +1,4 @@
-"""Selector and proactor eventloops for Windows."""
+"""Selector and proactor event loops for Windows."""
 
 import _winapi
 import errno
diff --git a/Lib/selectors.py b/Lib/selectors.py
--- a/Lib/selectors.py
+++ b/Lib/selectors.py
@@ -80,7 +80,7 @@
 
     A selector can use various implementations (select(), poll(), epoll()...)
     depending on the platform. The default `Selector` class uses the most
-    performant implementation on the current platform.
+    efficient implementation on the current platform.
     """
 
     @abstractmethod
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
--- a/Lib/test/test_asyncio/test_base_events.py
+++ b/Lib/test/test_asyncio/test_base_events.py
@@ -277,7 +277,7 @@
             asyncio.SubprocessProtocol, *args, bufsize=4096)
 
     def test_subprocess_shell_invalid_args(self):
-        # exepected a string, not an int or a list
+        # expected a string, not an int or a list
         self.assertRaises(TypeError,
             self.loop.run_until_complete, self.loop.subprocess_shell,
             asyncio.SubprocessProtocol, 123)
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -503,7 +503,6 @@
         tr, pr = self.loop.run_until_complete(connection_fut)
         self.assertIsInstance(tr, asyncio.Transport)
         self.assertIsInstance(pr, asyncio.Protocol)
-        self.assertIsNotNone(tr.get_extra_info('sockname'))
         self.loop.run_until_complete(pr.done)
         self.assertGreater(pr.nbytes, 0)
         tr.close()
diff --git a/Lib/test/test_asyncio/test_futures.py b/Lib/test/test_asyncio/test_futures.py
--- a/Lib/test/test_asyncio/test_futures.py
+++ b/Lib/test/test_asyncio/test_futures.py
@@ -38,7 +38,7 @@
             asyncio.set_event_loop(None)
 
     def test_constructor_positional(self):
-        # Make sure Future does't accept a positional argument
+        # Make sure Future doesn't accept a positional argument
         self.assertRaises(TypeError, asyncio.Future, 42)
 
     def test_cancel(self):
diff --git a/Lib/test/test_asyncio/test_streams.py b/Lib/test/test_asyncio/test_streams.py
--- a/Lib/test/test_asyncio/test_streams.py
+++ b/Lib/test/test_asyncio/test_streams.py
@@ -239,7 +239,7 @@
         # No b'\n' at the end. The 'limit' is set to 3. So before
         # waiting for the new data in buffer, 'readline' will consume
         # the entire buffer, and since the length of the consumed data
-        # is more than 3, it will raise a ValudError. The buffer is
+        # is more than 3, it will raise a ValueError. The buffer is
         # expected to be empty now.
         self.assertEqual(b'', stream._buffer)
 
diff --git a/Lib/test/test_asyncio/test_unix_events.py b/Lib/test/test_asyncio/test_unix_events.py
--- a/Lib/test/test_asyncio/test_unix_events.py
+++ b/Lib/test/test_asyncio/test_unix_events.py
@@ -965,7 +965,7 @@
         self.assertFalse(m.WEXITSTATUS.called)
         self.assertFalse(m.WTERMSIG.called)
 
-        # childen are running
+        # children are running
         self.watcher._sig_chld()
 
         self.assertFalse(callback1.called)
@@ -1069,7 +1069,7 @@
         self.assertFalse(m.WEXITSTATUS.called)
         self.assertFalse(m.WTERMSIG.called)
 
-        # childen are running
+        # children are running
         self.watcher._sig_chld()
 
         self.assertFalse(callback1.called)
@@ -1425,7 +1425,7 @@
         self.add_zombie(61, 11)
         self.add_zombie(62, -5)
 
-        # SIGCHLD was not catched
+        # SIGCHLD was not caught
         self.assertFalse(callback1.called)
         self.assertFalse(callback2.called)
         self.assertFalse(callback3.called)

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


More information about the Python-checkins mailing list