Skip to content

Commit bfa9188

Browse files
authored
asyncio: expose WriteTransport.get_write_buffer_limits on all Python versions (#7718)
1 parent ff2feff commit bfa9188

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

stdlib/asyncio/transports.pyi

+1-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ class ReadTransport(BaseTransport):
2828
class WriteTransport(BaseTransport):
2929
def set_write_buffer_limits(self, high: int | None = ..., low: int | None = ...) -> None: ...
3030
def get_write_buffer_size(self) -> int: ...
31-
if sys.version_info >= (3, 9):
32-
def get_write_buffer_limits(self) -> tuple[int, int]: ...
33-
31+
def get_write_buffer_limits(self) -> tuple[int, int]: ...
3432
def write(self, data: Any) -> None: ...
3533
def writelines(self, list_of_data: list[Any]) -> None: ...
3634
def write_eof(self) -> None: ...

tests/stubtest_allowlists/py36.txt

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ asyncio.futures.Future.__init__ # Usually initialized from c object
88
asyncio.futures._TracebackLogger.__init__
99
asyncio.locks._ContextManagerMixin.__enter__ # Always raises; deliberately omitted from the stub
1010
asyncio.locks._ContextManagerMixin.__exit__ # Always raises; deliberately omitted from the stub
11+
asyncio.transports.WriteTransport.get_write_buffer_limits # Documented. Exists in subclasses, but not in WriteTransport itself
12+
asyncio.WriteTransport.get_write_buffer_limits # Documented. Exists in subclasses, but not in WriteTransport itself
1113
builtins.float.__setformat__ # Internal method for CPython test suite
1214
builtins.str.maketrans
1315
cmath.log

tests/stubtest_allowlists/py37.txt

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ asyncio.futures.Future.__init__ # Usually initialized from c object
1111
asyncio.futures.Future._callbacks # Usually initialized from c object
1212
asyncio.locks._ContextManagerMixin.__enter__ # Always raises; deliberately omitted from the stub
1313
asyncio.locks._ContextManagerMixin.__exit__ # Always raises; deliberately omitted from the stub
14+
asyncio.transports.WriteTransport.get_write_buffer_limits # Documented. Exists in subclasses, but not in WriteTransport itself
15+
asyncio.WriteTransport.get_write_buffer_limits # Documented. Exists in subclasses, but not in WriteTransport itself
1416
builtins.dict.get
1517
builtins.float.__set_format__ # Internal method for CPython test suite
1618
builtins.str.maketrans

tests/stubtest_allowlists/py38.txt

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ asyncio.futures.Future.__init__ # Usually initialized from c object
1717
asyncio.futures.Future._callbacks # Usually initialized from c object
1818
asyncio.locks._ContextManagerMixin.__enter__ # Always raises; deliberately omitted from the stub
1919
asyncio.locks._ContextManagerMixin.__exit__ # Always raises; deliberately omitted from the stub
20+
asyncio.transports.WriteTransport.get_write_buffer_limits # Documented. Exists in subclasses, but not in WriteTransport itself
21+
asyncio.WriteTransport.get_write_buffer_limits # Documented. Exists in subclasses, but not in WriteTransport itself
2022
builtins.dict.get
2123
builtins.float.__set_format__ # Internal method for CPython test suite
2224
collections.AsyncGenerator.asend # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also.

0 commit comments

Comments
 (0)