Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 60 additions & 6 deletions stdlib/asyncio/base_events.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,27 @@ class BaseEventLoop(AbstractEventLoop):
async def create_server(
self,
protocol_factory: _ProtocolFactory,
host: str | Sequence[str] | None = None,
port: int = ...,
host: str | Sequence[str] | None,
port: int,
*,
family: int = 0,
flags: int = 1,
sock: None = None,
backlog: int = 100,
ssl: _SSLContext = None,
reuse_address: bool | None = None,
reuse_port: bool | None = None,
keep_alive: bool | None = None,
ssl_handshake_timeout: float | None = None,
ssl_shutdown_timeout: float | None = None,
start_serving: bool = True,
) -> Server: ...
@overload
async def create_server(
self,
protocol_factory: _ProtocolFactory,
host: str | Sequence[str],
port: int | None = None,
*,
family: int = 0,
flags: int = 1,
Expand Down Expand Up @@ -282,8 +301,8 @@ class BaseEventLoop(AbstractEventLoop):
async def create_server(
self,
protocol_factory: _ProtocolFactory,
host: str | Sequence[str] | None = None,
port: int = ...,
host: str | Sequence[str] | None,
port: int,
*,
family: int = AddressFamily.AF_UNSPEC,
flags: int = AddressInfo.AI_PASSIVE,
Expand All @@ -297,6 +316,24 @@ class BaseEventLoop(AbstractEventLoop):
start_serving: bool = True,
) -> Server: ...
@overload
async def create_server(
self,
protocol_factory: _ProtocolFactory,
host: str | Sequence[str],
port: int | None = None,
*,
family: AddressFamily = AddressFamily.AF_UNSPEC,
flags: int = AddressInfo.AI_PASSIVE,
sock: None = None,
backlog: int = 100,
ssl: _SSLContext = None,
reuse_address: bool | None = None,
reuse_port: bool | None = None,
ssl_handshake_timeout: float | None = None,
ssl_shutdown_timeout: float | None = None,
start_serving: bool = True,
) -> Server: ...
@overload
async def create_server(
self,
protocol_factory: _ProtocolFactory,
Expand All @@ -319,8 +356,8 @@ class BaseEventLoop(AbstractEventLoop):
async def create_server(
self,
protocol_factory: _ProtocolFactory,
host: str | Sequence[str] | None = None,
port: int = ...,
host: str | Sequence[str] | None,
port: int,
*,
family: int = AddressFamily.AF_UNSPEC,
flags: int = AddressInfo.AI_PASSIVE,
Expand All @@ -333,6 +370,23 @@ class BaseEventLoop(AbstractEventLoop):
start_serving: bool = True,
) -> Server: ...
@overload
async def create_server(
self,
protocol_factory: _ProtocolFactory,
host: str | Sequence[str],
port: int | None = None,
*,
family: AddressFamily = AddressFamily.AF_UNSPEC,
flags: int = AddressInfo.AI_PASSIVE,
sock: None = None,
backlog: int = 100,
ssl: _SSLContext = None,
reuse_address: bool | None = None,
reuse_port: bool | None = None,
ssl_handshake_timeout: float | None = None,
start_serving: bool = True,
) -> Server: ...
@overload
async def create_server(
self,
protocol_factory: _ProtocolFactory,
Expand Down
69 changes: 63 additions & 6 deletions stdlib/asyncio/events.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,28 @@ class AbstractEventLoop:
async def create_server(
self,
protocol_factory: _ProtocolFactory,
host: str | Sequence[str] | None = None,
port: int = ...,
host: str | Sequence[str] | None,
port: int,
*,
family: int = AddressFamily.AF_UNSPEC,
flags: int = AddressInfo.AI_PASSIVE,
sock: None = None,
backlog: int = 100,
ssl: _SSLContext = None,
reuse_address: bool | None = None,
reuse_port: bool | None = None,
keep_alive: bool | None = None,
ssl_handshake_timeout: float | None = None,
ssl_shutdown_timeout: float | None = None,
start_serving: bool = True,
) -> Server: ...
@overload
@abstractmethod
async def create_server(
self,
protocol_factory: _ProtocolFactory,
host: str | Sequence[str],
port: int | None = None,
*,
family: int = AddressFamily.AF_UNSPEC,
flags: int = AddressInfo.AI_PASSIVE,
Expand Down Expand Up @@ -339,8 +359,8 @@ class AbstractEventLoop:
async def create_server(
self,
protocol_factory: _ProtocolFactory,
host: str | Sequence[str] | None = None,
port: int = ...,
host: str | Sequence[str] | None,
port: int,
*,
family: int = AddressFamily.AF_UNSPEC,
flags: int = AddressInfo.AI_PASSIVE,
Expand All @@ -355,6 +375,25 @@ class AbstractEventLoop:
) -> Server: ...
@overload
@abstractmethod
async def create_server(
self,
protocol_factory: _ProtocolFactory,
host: str | Sequence[str],
port: int | None = None,
*,
family: AddressFamily = AddressFamily.AF_UNSPEC,
flags: int = AddressInfo.AI_PASSIVE,
sock: None = None,
backlog: int = 100,
ssl: _SSLContext = None,
reuse_address: bool | None = None,
reuse_port: bool | None = None,
ssl_handshake_timeout: float | None = None,
ssl_shutdown_timeout: float | None = None,
start_serving: bool = True,
) -> Server: ...
@overload
@abstractmethod
async def create_server(
self,
protocol_factory: _ProtocolFactory,
Expand All @@ -378,8 +417,8 @@ class AbstractEventLoop:
async def create_server(
self,
protocol_factory: _ProtocolFactory,
host: str | Sequence[str] | None = None,
port: int = ...,
host: str | Sequence[str] | None,
port: int,
*,
family: int = AddressFamily.AF_UNSPEC,
flags: int = AddressInfo.AI_PASSIVE,
Expand All @@ -393,6 +432,24 @@ class AbstractEventLoop:
) -> Server: ...
@overload
@abstractmethod
async def create_server(
self,
protocol_factory: _ProtocolFactory,
host: str | Sequence[str],
port: int | None = None,
*,
family: AddressFamily = AddressFamily.AF_UNSPEC,
flags: int = AddressInfo.AI_PASSIVE,
sock: None = None,
backlog: int = 100,
ssl: _SSLContext = None,
reuse_address: bool | None = None,
reuse_port: bool | None = None,
ssl_handshake_timeout: float | None = None,
start_serving: bool = True,
) -> Server: ...
@overload
@abstractmethod
async def create_server(
self,
protocol_factory: _ProtocolFactory,
Expand Down