Skip to content

Commit

Permalink
correct parameter name for sock_recv of BaseEventLoop subclasses (pyt…
Browse files Browse the repository at this point in the history
  • Loading branch information
tungol authored Dec 10, 2024
1 parent 4664a14 commit b076859
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions stdlib/@tests/stubtest_allowlists/common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions stdlib/asyncio/proactor_events.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...
2 changes: 2 additions & 0 deletions stdlib/asyncio/selector_events.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import selectors
from socket import socket

from . import base_events

__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: ...

0 comments on commit b076859

Please sign in to comment.