correct parameter name for sock_recv of BaseEventLoop subclasses (#13212)

This commit is contained in:
Stephen Morton
2024-12-09 18:26:34 -08:00
committed by GitHub
parent 4664a1406e
commit b0768596d2
3 changed files with 3 additions and 2 deletions

View File

@@ -288,8 +288,6 @@ ast.Str.__new__ # runtime is *args, **kwargs due to a wrapper, but we have more
ast.NodeVisitor.visit_\w+ # Methods are discovered dynamically, see #3796
_?asyncio.Future.__init__ # Usually initialized from c object
asyncio.futures.Future.__init__ # Usually initialized from c object
asyncio.proactor_events.BaseProactorEventLoop.sock_recv # nbytes parameter has different name 'n' in implementation
asyncio.selector_events.BaseSelectorEventLoop.sock_recv # nbytes parameter has different name 'n' in implementation
# Condition functions are exported in __init__
asyncio.Condition.acquire

View File

@@ -62,3 +62,4 @@ class _ProactorSocketTransport(_ProactorReadPipeTransport, _ProactorBaseWritePip
class BaseProactorEventLoop(base_events.BaseEventLoop):
def __init__(self, proactor: Any) -> None: ...
async def sock_recv(self, sock: socket, n: int) -> bytes: ...

View File

@@ -1,4 +1,5 @@
import selectors
from socket import socket
from . import base_events
@@ -6,3 +7,4 @@ __all__ = ("BaseSelectorEventLoop",)
class BaseSelectorEventLoop(base_events.BaseEventLoop):
def __init__(self, selector: selectors.BaseSelector | None = None) -> None: ...
async def sock_recv(self, sock: socket, n: int) -> bytes: ...