diff --git a/asyncpg/connect_utils.py b/asyncpg/connect_utils.py index 6957fa79..4cc87fc8 100644 --- a/asyncpg/connect_utils.py +++ b/asyncpg/connect_utils.py @@ -4,6 +4,7 @@ # This module is part of asyncpg and is released under # the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0 +from __future__ import annotations import asyncio import collections @@ -59,7 +60,7 @@ class _ConnectionParameters(typing.NamedTuple): sslmode: SSLMode ssl_negotiation: SSLNegotiation server_settings: typing.Optional[typing.Dict[str, str]] - target_session_attrs: "SessionAttribute" + target_session_attrs: SessionAttribute krbsrvname: typing.Optional[str] gsslib: str @@ -129,7 +130,7 @@ def _read_password_file(passfile: pathlib.Path) \ def _read_password_from_pgpass( *, passfile: pathlib.Path, - hosts: "Sequence[str]", + hosts: Sequence[str], ports: typing.List[int], database: str, user: str @@ -166,7 +167,7 @@ def _read_password_from_pgpass( def _validate_port_spec( - hosts: "Sequence[object]", port: typing.Union[int, typing.List[int]] + hosts: Sequence[object], port: typing.Union[int, typing.List[int]] ) -> typing.List[int]: if isinstance(port, list): # If there is a list of ports, its length must