]> granicus.if.org Git - python/commitdiff
asyncio: Fix spelling and typos.
authorYury Selivanov <yselivanov@sprymix.com>
Wed, 19 Feb 2014 03:27:48 +0000 (22:27 -0500)
committerYury Selivanov <yselivanov@sprymix.com>
Wed, 19 Feb 2014 03:27:48 +0000 (22:27 -0500)
Thanks to Vajrasky Kok for discovering some of them.

13 files changed:
Lib/asyncio/events.py
Lib/asyncio/protocols.py
Lib/asyncio/selector_events.py
Lib/asyncio/tasks.py
Lib/asyncio/test_utils.py
Lib/asyncio/unix_events.py
Lib/asyncio/windows_events.py
Lib/selectors.py
Lib/test/test_asyncio/test_base_events.py
Lib/test/test_asyncio/test_events.py
Lib/test/test_asyncio/test_futures.py
Lib/test/test_asyncio/test_streams.py
Lib/test/test_asyncio/test_unix_events.py

index f61c5b7487edd03f4fb14b250a97324b5d28fc3c..1030c045bd8686deb446718b2b0e305ebe564728 100644 (file)
@@ -235,7 +235,7 @@ class AbstractEventLoop:
                            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 @@ class AbstractEventLoop:
     # 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 @@ class AbstractEventLoop:
         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.
index 3c4f3f4adac8f91fdc46c52906871ec055264f39..52fc25c2ee9a21456e13d51126159523e63a1f77 100644 (file)
@@ -114,7 +114,7 @@ class SubprocessProtocol(BaseProtocol):
     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.
         """
 
index c142356f721b7f7ed9b9367dab8d4f2077e8b3d1..aa427459b1c28bc839b4d210b809edea5c744839 100644 (file)
@@ -213,7 +213,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
 
     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
index b7ee758d64081b28c8c6c8bc2dcd9cc85770f3d0..a3e7cdf11e4ba0ef6a8dd7f640fb4b8ff3fed8a9 100644 (file)
@@ -181,7 +181,7 @@ class Task(futures.Future):
 
         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
index 28e52430ad97ff9fb6401261aff73c11fb9c5397..2a8a241fd5ed913ef200c9e5de6c19ae145dde5f 100644 (file)
@@ -259,7 +259,7 @@ class TestLoop(base_events.BaseEventLoop):
             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 @@ class MockPattern(str):
     """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'))
index faf4c60d5bb525e16d6ab08b8938e2901b504aa1..ce45e5ff6f0a9285f00034b5cf6b1c8a6da4aa7e 100644 (file)
@@ -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 @@ def _set_nonblocking(fd):
 
 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)
index c667a1c319955188700a0cfa64344e586cf7b29b..e6be9d13011405baeb2ab9a9346ec653ae569a77 100644 (file)
@@ -1,4 +1,4 @@
-"""Selector and proactor eventloops for Windows."""
+"""Selector and proactor event loops for Windows."""
 
 import _winapi
 import errno
index bb2a45a839093b5b5913ac88fd6e946f0d22d5d6..a5465e241fbadcb0347ee748da899029095d8277 100644 (file)
@@ -80,7 +80,7 @@ class BaseSelector(metaclass=ABCMeta):
 
     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
index f664cccf43f65602882ef5a19fadd2e44c9334cc..2eee3be3a87c939e5e3e6631f309c32a9cd963b1 100644 (file)
@@ -277,7 +277,7 @@ class BaseEventLoopTests(unittest.TestCase):
             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)
index 15cc5202985ca8aba476bf8bf0ead84c67b39093..a0a4d02ca8a30457e3a0771589a94f1379685954 100644 (file)
@@ -503,7 +503,6 @@ class EventLoopTestsMixin:
         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()
index 2e4dbd4a684c89ba356ef0e0aaa5fef330648b6c..f2b81ddd987efd9bc90ea44b3f5fe09e9e866640 100644 (file)
@@ -38,7 +38,7 @@ class FutureTests(unittest.TestCase):
             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):
index 31e26a641ad38e0ecdbe4db5b9f369af915a6c1c..ca792f20fc9395a95e5ed9b51181d81a8c6ea101 100644 (file)
@@ -239,7 +239,7 @@ class StreamReaderTests(unittest.TestCase):
         # 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)
 
index 7b5196c8bef9894d7b24922d0a0b9a0ad80f90e6..c0f205e59aec84ce77cdf297c2fb671907afd2e0 100644 (file)
@@ -965,7 +965,7 @@ class ChildWatcherTestsMixin:
         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 @@ class ChildWatcherTestsMixin:
         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 @@ class ChildWatcherTestsMixin:
         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)