Skip to content

Commit ff6c077

Browse files
authored
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.
1 parent c45fc76 commit ff6c077

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Lib/asyncio/proactor_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def _data_received(self, data):
234234

235235
if isinstance(self._protocol, protocols.BufferedProtocol):
236236
try:
237-
protocols._feed_data_to_bufferred_proto(self._protocol, data)
237+
protocols._feed_data_to_buffered_proto(self._protocol, data)
238238
except Exception as exc:
239239
self._fatal_error(exc,
240240
'Fatal error: protocol.buffer_updated() '

Lib/asyncio/protocols.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def process_exited(self):
191191
"""Called when subprocess has exited."""
192192

193193

194-
def _feed_data_to_bufferred_proto(proto, data):
194+
def _feed_data_to_buffered_proto(proto, data):
195195
data_len = len(data)
196196
while data_len:
197197
buf = proto.get_buffer(data_len)

Lib/asyncio/sslproto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ def data_received(self, data):
535535
if chunk:
536536
try:
537537
if self._app_protocol_is_buffer:
538-
protocols._feed_data_to_bufferred_proto(
538+
protocols._feed_data_to_buffered_proto(
539539
self._app_protocol, chunk)
540540
else:
541541
self._app_protocol.data_received(chunk)

Lib/test/test_asyncio/test_sslproto.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,28 +190,28 @@ def buffer_updated(self, nsize):
190190

191191
for usemv in [False, True]:
192192
proto = Proto(1, usemv)
193-
protocols._feed_data_to_bufferred_proto(proto, b'12345')
193+
protocols._feed_data_to_buffered_proto(proto, b'12345')
194194
self.assertEqual(proto.data, b'12345')
195195

196196
proto = Proto(2, usemv)
197-
protocols._feed_data_to_bufferred_proto(proto, b'12345')
197+
protocols._feed_data_to_buffered_proto(proto, b'12345')
198198
self.assertEqual(proto.data, b'12345')
199199

200200
proto = Proto(2, usemv)
201-
protocols._feed_data_to_bufferred_proto(proto, b'1234')
201+
protocols._feed_data_to_buffered_proto(proto, b'1234')
202202
self.assertEqual(proto.data, b'1234')
203203

204204
proto = Proto(4, usemv)
205-
protocols._feed_data_to_bufferred_proto(proto, b'1234')
205+
protocols._feed_data_to_buffered_proto(proto, b'1234')
206206
self.assertEqual(proto.data, b'1234')
207207

208208
proto = Proto(100, usemv)
209-
protocols._feed_data_to_bufferred_proto(proto, b'12345')
209+
protocols._feed_data_to_buffered_proto(proto, b'12345')
210210
self.assertEqual(proto.data, b'12345')
211211

212212
proto = Proto(0, usemv)
213213
with self.assertRaisesRegex(RuntimeError, 'empty buffer'):
214-
protocols._feed_data_to_bufferred_proto(proto, b'12345')
214+
protocols._feed_data_to_buffered_proto(proto, b'12345')
215215

216216
def test_start_tls_client_reg_proto_1(self):
217217
HELLO_MSG = b'1' * self.PAYLOAD_SIZE

0 commit comments

Comments
 (0)