]> granicus.if.org Git - python/commitdiff
bpo-33694: Fix typo in helper function name (GH-7522)
authorVictor Stinner <vstinner@redhat.com>
Fri, 8 Jun 2018 08:32:06 +0000 (10:32 +0200)
committerGitHub <noreply@github.com>
Fri, 8 Jun 2018 08:32:06 +0000 (10:32 +0200)
_feed_data_to_bufferred_proto() renamed to
_feed_data_to_buffered_proto() ("bufferred" => "buffered").

Typo spotted by Nathaniel J. Smith.

Lib/asyncio/proactor_events.py
Lib/asyncio/protocols.py
Lib/asyncio/sslproto.py
Lib/test/test_asyncio/test_sslproto.py

index d9cfdff02c9ae19eaf048d1745573d1054548a6c..6d230a2d17734eaf3ced67f7e1ef9107be24c016 100644 (file)
@@ -234,7 +234,7 @@ class _ProactorReadPipeTransport(_ProactorBasePipeTransport,
 
         if isinstance(self._protocol, protocols.BufferedProtocol):
             try:
-                protocols._feed_data_to_bufferred_proto(self._protocol, data)
+                protocols._feed_data_to_buffered_proto(self._protocol, data)
             except Exception as exc:
                 self._fatal_error(exc,
                                   'Fatal error: protocol.buffer_updated() '
index 4d47da387caa3f5826a67e21fa01bd8494a623d5..a35ea822f33e60e66a0f436471f810f3b9bdb6b5 100644 (file)
@@ -191,7 +191,7 @@ class SubprocessProtocol(BaseProtocol):
         """Called when subprocess has exited."""
 
 
-def _feed_data_to_bufferred_proto(proto, data):
+def _feed_data_to_buffered_proto(proto, data):
     data_len = len(data)
     while data_len:
         buf = proto.get_buffer(data_len)
index 5578c6f81834ae666d0deb7d706ccd0cf347398f..12fdb0d1c5ec1008844a07cd682678d96cce6e3d 100644 (file)
@@ -535,7 +535,7 @@ class SSLProtocol(protocols.Protocol):
             if chunk:
                 try:
                     if self._app_protocol_is_buffer:
-                        protocols._feed_data_to_bufferred_proto(
+                        protocols._feed_data_to_buffered_proto(
                             self._app_protocol, chunk)
                     else:
                         self._app_protocol.data_received(chunk)
index 4ace48f9988894d4b0fda084a7aac69a7663dcf4..818267138a4cf52519df0a3f061de16577f7091c 100644 (file)
@@ -190,28 +190,28 @@ class BaseStartTLS(func_tests.FunctionalTestCaseMixin):
 
         for usemv in [False, True]:
             proto = Proto(1, usemv)
-            protocols._feed_data_to_bufferred_proto(proto, b'12345')
+            protocols._feed_data_to_buffered_proto(proto, b'12345')
             self.assertEqual(proto.data, b'12345')
 
             proto = Proto(2, usemv)
-            protocols._feed_data_to_bufferred_proto(proto, b'12345')
+            protocols._feed_data_to_buffered_proto(proto, b'12345')
             self.assertEqual(proto.data, b'12345')
 
             proto = Proto(2, usemv)
-            protocols._feed_data_to_bufferred_proto(proto, b'1234')
+            protocols._feed_data_to_buffered_proto(proto, b'1234')
             self.assertEqual(proto.data, b'1234')
 
             proto = Proto(4, usemv)
-            protocols._feed_data_to_bufferred_proto(proto, b'1234')
+            protocols._feed_data_to_buffered_proto(proto, b'1234')
             self.assertEqual(proto.data, b'1234')
 
             proto = Proto(100, usemv)
-            protocols._feed_data_to_bufferred_proto(proto, b'12345')
+            protocols._feed_data_to_buffered_proto(proto, b'12345')
             self.assertEqual(proto.data, b'12345')
 
             proto = Proto(0, usemv)
             with self.assertRaisesRegex(RuntimeError, 'empty buffer'):
-                protocols._feed_data_to_bufferred_proto(proto, b'12345')
+                protocols._feed_data_to_buffered_proto(proto, b'12345')
 
     def test_start_tls_client_reg_proto_1(self):
         HELLO_MSG = b'1' * self.PAYLOAD_SIZE