[Python-checkins] bpo-33694: Fix typo in helper function name (GH-7522)
Victor Stinner
webhook-mailer at python.org
Fri Jun 8 04:32:14 EDT 2018
https://github.com/python/cpython/commit/ff6c07729211fb98431a2793e074d07a21e0650a
commit: ff6c07729211fb98431a2793e074d07a21e0650a
branch: master
author: Victor Stinner <vstinner at redhat.com>
committer: GitHub <noreply at github.com>
date: 2018-06-08T10:32:06+02:00
summary:
bpo-33694: Fix typo in helper function name (GH-7522)
_feed_data_to_bufferred_proto() renamed to
_feed_data_to_buffered_proto() ("bufferred" => "buffered").
Typo spotted by Nathaniel J. Smith.
files:
M Lib/asyncio/proactor_events.py
M Lib/asyncio/protocols.py
M Lib/asyncio/sslproto.py
M Lib/test/test_asyncio/test_sslproto.py
diff --git a/Lib/asyncio/proactor_events.py b/Lib/asyncio/proactor_events.py
index d9cfdff02c9a..6d230a2d1773 100644
--- a/Lib/asyncio/proactor_events.py
+++ b/Lib/asyncio/proactor_events.py
@@ -234,7 +234,7 @@ def _data_received(self, data):
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() '
diff --git a/Lib/asyncio/protocols.py b/Lib/asyncio/protocols.py
index 4d47da387caa..a35ea822f33e 100644
--- a/Lib/asyncio/protocols.py
+++ b/Lib/asyncio/protocols.py
@@ -191,7 +191,7 @@ def process_exited(self):
"""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)
diff --git a/Lib/asyncio/sslproto.py b/Lib/asyncio/sslproto.py
index 5578c6f81834..12fdb0d1c5ec 100644
--- a/Lib/asyncio/sslproto.py
+++ b/Lib/asyncio/sslproto.py
@@ -535,7 +535,7 @@ def data_received(self, data):
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)
diff --git a/Lib/test/test_asyncio/test_sslproto.py b/Lib/test/test_asyncio/test_sslproto.py
index 4ace48f99888..818267138a4c 100644
--- a/Lib/test/test_asyncio/test_sslproto.py
+++ b/Lib/test/test_asyncio/test_sslproto.py
@@ -190,28 +190,28 @@ def buffer_updated(self, nsize):
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
More information about the Python-checkins
mailing list