Skip to content

Commit 0c5b6ad

Browse files
Kriechipgjones
authored andcommitted
s/amt/amount/
1 parent 53290ce commit 0c5b6ad

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

HISTORY.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ Release History
44
3.1.0dev0
55
---------
66

7+
API Changes (Backward-Incompatible)
8+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9+
10+
- ``h2.connection.H2Connection.data_to_send`` first and only argument ``amt``
11+
was renamed to ``amount``.
12+
713
API Changes (Backward-Compatible)
814
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
915

h2/connection.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,7 @@ def acknowledge_received_data(self, acknowledged_size, stream_id):
13371337

13381338
self._prepare_for_sending(frames)
13391339

1340-
def data_to_send(self, amt=None):
1340+
def data_to_send(self, amount=None):
13411341
"""
13421342
Returns some data for sending out of the internal data buffer.
13431343
@@ -1346,19 +1346,19 @@ def data_to_send(self, amt=None):
13461346
or less if that much data is not available. It does not perform any
13471347
I/O, and so uses a different name.
13481348
1349-
:param amt: (optional) The maximum amount of data to return. If not
1349+
:param amount: (optional) The maximum amount of data to return. If not
13501350
set, or set to ``None``, will return as much data as possible.
1351-
:type amt: ``int``
1351+
:type amount: ``int``
13521352
:returns: A bytestring containing the data to send on the wire.
13531353
:rtype: ``bytes``
13541354
"""
1355-
if amt is None:
1355+
if amount is None:
13561356
data = self._data_to_send
13571357
self._data_to_send = b''
13581358
return data
13591359
else:
1360-
data = self._data_to_send[:amt]
1361-
self._data_to_send = self._data_to_send[amt:]
1360+
data = self._data_to_send[:amount]
1361+
self._data_to_send = self._data_to_send[amount:]
13621362
return data
13631363

13641364
def clear_outbound_data_buffer(self):

0 commit comments

Comments
 (0)