]> git.ipfire.org Git - thirdparty/psycopg.git/commit
feat: don't block on address resolution in async connections
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 3 Jul 2022 00:25:19 +0000 (01:25 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 3 Jul 2022 00:25:19 +0000 (01:25 +0100)
commit96c7b0421baab0466bd8d0456b4498aec9c541f1
tree8585db30152178bfa946f0b14e9f57084026d8ff
parente53b2bebf51768eebf4c7445dbfc5f663374bfdd
feat: don't block on address resolution in async connections

Use the same algorithm implemented in the `_dns` module, but based on
asyncio getaddrinfo: this avoids the need of the external dns package
and works correctly with the /etc/hosts file.

There were problems of resource leaking in Python 3.6, but as psycopg
3.1 is 3.7+ only, let's go for it!
psycopg/psycopg/_dns.py
psycopg/psycopg/connection_async.py
psycopg/psycopg/conninfo.py
tests/test_connection.py
tests/test_connection_async.py
tests/test_conninfo.py
tests/test_dns.py