]> git.ipfire.org Git - thirdparty/psycopg.git/commit
refactor: handle timeout in the connection generator, not the waiting function
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 26 Jan 2024 09:47:31 +0000 (09:47 +0000)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 5 Apr 2024 15:20:57 +0000 (15:20 +0000)
commit46e61e07680c6128310dbdedc32c295cebb60b36
tree9998b4caf0a701f28c86972c0c53b8ce93969c95
parente68aa19fb411d8e1b385860e57a40af367072a54
refactor: handle timeout in the connection generator, not the waiting function

The waiting function is supposed to be generic, the timeout is a policy
decision of the generator.

This change aligns the semantics of the `timeout` parameter of `wait_conn()`
to the one of the other wait functions: the timeout is actually an
interval. It will be renamed to clarify that in a followup commit.
psycopg/psycopg/_connection_base.py
psycopg/psycopg/connection.py
psycopg/psycopg/connection_async.py
psycopg/psycopg/generators.py
psycopg/psycopg/waiting.py
psycopg_c/psycopg_c/_psycopg.pyi
psycopg_c/psycopg_c/_psycopg/generators.pyx
tests/test_connection.py
tests/test_connection_async.py
tests/test_module.py
tests/test_psycopg_dbapi20.py