Skip to content

bpo-33694: Fix typo in asyncio helper function name #7522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/asyncio/proactor_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -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() '
Expand Down
2 changes: 1 addition & 1 deletion Lib/asyncio/protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Lib/asyncio/sslproto.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions Lib/test/test_asyncio/test_sslproto.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down