>>> py3-pgspecial: Building community/py3-pgspecial 2.2.1-r0 (using abuild 3.15.0-r0) started Sun, 12 Oct 2025 22:28:38 +0000 >>> py3-pgspecial: Validating /home/udu/aports/community/py3-pgspecial/APKBUILD... >>> py3-pgspecial: Analyzing dependencies... >>> py3-pgspecial: Installing for build: build-base py3-click py3-psycopg-c py3-sqlparse py3-gpep517 py3-setuptools py3-setuptools_scm py3-wheel py3-pytest py3-configobj WARNING: opening /home/udu/packages//community: No such file or directory WARNING: opening /home/udu/packages//main: No such file or directory fetch http://dl-cdn.alpinelinux.org/alpine/v3.22/main/x86_64/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.22/community/x86_64/APKINDEX.tar.gz (1/36) Installing py3-click-pyc (8.1.8-r1) (2/36) Installing py3-click (8.1.8-r1) (3/36) Installing py3-psycopg (3.1.20-r0) (4/36) Installing py3-psycopg-pyc (3.1.20-r0) (5/36) Installing libpq (17.6-r0) (6/36) Installing py3-psycopg-c (3.1.20-r0) (7/36) Installing py3-psycopg-c-pyc (3.1.20-r0) (8/36) Installing py3-sqlparse (0.5.1-r0) (9/36) Installing py3-sqlparse-pyc (0.5.1-r0) (10/36) Installing py3-installer (0.7.0-r2) (11/36) Installing py3-installer-pyc (0.7.0-r2) (12/36) Installing py3-gpep517 (19-r0) (13/36) Installing py3-gpep517-pyc (19-r0) (14/36) Installing py3-parsing (3.2.3-r0) (15/36) Installing py3-parsing-pyc (3.2.3-r0) (16/36) Installing py3-packaging (25.0-r0) (17/36) Installing py3-packaging-pyc (25.0-r0) (18/36) Installing py3-setuptools (80.9.0-r0) (19/36) Installing py3-setuptools-pyc (80.9.0-r0) (20/36) Installing py3-setuptools_scm (8.3.1-r0) (21/36) Installing py3-setuptools_scm-pyc (8.3.1-r0) (22/36) Installing py3-wheel (0.46.1-r0) (23/36) Installing py3-wheel-pyc (0.46.1-r0) (24/36) Installing py3-iniconfig (2.1.0-r0) (25/36) Installing py3-iniconfig-pyc (2.1.0-r0) (26/36) Installing py3-pluggy (1.5.0-r0) (27/36) Installing py3-pluggy-pyc (1.5.0-r0) (28/36) Installing py3-py (1.11.0-r4) (29/36) Installing py3-py-pyc (1.11.0-r4) (30/36) Installing py3-pytest (8.3.5-r0) (31/36) Installing py3-pytest-pyc (8.3.5-r0) (32/36) Installing py3-six (1.17.0-r0) (33/36) Installing py3-six-pyc (1.17.0-r0) (34/36) Installing py3-configobj (5.0.9-r0) (35/36) Installing py3-configobj-pyc (5.0.9-r0) (36/36) Installing .makedepends-py3-pgspecial (20251012.222839) Executing busybox-1.37.0-r19.trigger OK: 314 MiB in 125 packages >>> py3-pgspecial: Cleaning up srcdir >>> py3-pgspecial: Cleaning up pkgdir >>> py3-pgspecial: Cleaning up tmpdir >>> py3-pgspecial: Fetching py3-pgspecial-2.2.1.tar.gz::https://github.com/dbcli/pgspecial/archive/refs/tags/v2.2.1.tar.gz >>> py3-pgspecial: Fetching py3-pgspecial-2.2.1.tar.gz::https://github.com/dbcli/pgspecial/archive/refs/tags/v2.2.1.tar.gz >>> py3-pgspecial: Checking sha512sums... py3-pgspecial-2.2.1.tar.gz: OK >>> py3-pgspecial: Unpacking /var/cache/distfiles/py3-pgspecial-2.2.1.tar.gz... 2025-10-12 22:28:40,623 gpep517 INFO Building wheel via backend setuptools.build_meta /usr/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated !! ******************************************************************************** Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0). By 2026-Feb-18, you need to update your project and remove deprecated calls or your builds will no longer be supported. See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! corresp(dist, value, root_dir) 2025-10-12 22:28:40,719 root INFO running bdist_wheel 2025-10-12 22:28:40,742 root INFO running build 2025-10-12 22:28:40,742 root INFO running build_py 2025-10-12 22:28:40,747 root INFO creating build/lib/pgspecial 2025-10-12 22:28:40,748 root INFO copying pgspecial/namedqueries.py -> build/lib/pgspecial 2025-10-12 22:28:40,748 root INFO copying pgspecial/iocommands.py -> build/lib/pgspecial 2025-10-12 22:28:40,749 root INFO copying pgspecial/__init__.py -> build/lib/pgspecial 2025-10-12 22:28:40,749 root INFO copying pgspecial/main.py -> build/lib/pgspecial 2025-10-12 22:28:40,750 root INFO copying pgspecial/dbcommands.py -> build/lib/pgspecial 2025-10-12 22:28:40,750 root INFO creating build/lib/pgspecial/help 2025-10-12 22:28:40,751 root INFO copying pgspecial/help/commands.py -> build/lib/pgspecial/help 2025-10-12 22:28:40,751 root INFO copying pgspecial/help/__init__.py -> build/lib/pgspecial/help 2025-10-12 22:28:40,751 root INFO running egg_info 2025-10-12 22:28:40,756 root INFO creating pgspecial.egg-info 2025-10-12 22:28:40,756 root INFO writing pgspecial.egg-info/PKG-INFO 2025-10-12 22:28:40,759 root INFO writing dependency_links to pgspecial.egg-info/dependency_links.txt 2025-10-12 22:28:40,761 root INFO writing requirements to pgspecial.egg-info/requires.txt 2025-10-12 22:28:40,761 root INFO writing top-level names to pgspecial.egg-info/top_level.txt 2025-10-12 22:28:40,762 root INFO writing manifest file 'pgspecial.egg-info/SOURCES.txt' ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any 2025-10-12 22:28:40,782 root INFO reading manifest file 'pgspecial.egg-info/SOURCES.txt' 2025-10-12 22:28:40,783 root INFO reading manifest template 'MANIFEST.in' 2025-10-12 22:28:40,783 root WARNING warning: no files found matching 'DEVELOP.rst' 2025-10-12 22:28:40,784 root WARNING warning: no files found matching 'setup.py' 2025-10-12 22:28:40,785 root WARNING warning: no files found matching '*.ini' under directory 'tests' 2025-10-12 22:28:40,786 root INFO writing manifest file 'pgspecial.egg-info/SOURCES.txt' 2025-10-12 22:28:40,800 root INFO installing to build/bdist.linux-x86_64/wheel 2025-10-12 22:28:40,800 root INFO running install 2025-10-12 22:28:40,809 root INFO running install_lib 2025-10-12 22:28:40,814 root INFO creating build/bdist.linux-x86_64/wheel 2025-10-12 22:28:40,815 root INFO creating build/bdist.linux-x86_64/wheel/pgspecial 2025-10-12 22:28:40,815 root INFO copying build/lib/pgspecial/namedqueries.py -> build/bdist.linux-x86_64/wheel/./pgspecial 2025-10-12 22:28:40,815 root INFO creating build/bdist.linux-x86_64/wheel/pgspecial/help 2025-10-12 22:28:40,815 root INFO copying build/lib/pgspecial/help/commands.py -> build/bdist.linux-x86_64/wheel/./pgspecial/help 2025-10-12 22:28:40,816 root INFO copying build/lib/pgspecial/help/__init__.py -> build/bdist.linux-x86_64/wheel/./pgspecial/help 2025-10-12 22:28:40,816 root INFO copying build/lib/pgspecial/iocommands.py -> build/bdist.linux-x86_64/wheel/./pgspecial 2025-10-12 22:28:40,816 root INFO copying build/lib/pgspecial/__init__.py -> build/bdist.linux-x86_64/wheel/./pgspecial 2025-10-12 22:28:40,817 root INFO copying build/lib/pgspecial/main.py -> build/bdist.linux-x86_64/wheel/./pgspecial 2025-10-12 22:28:40,817 root INFO copying build/lib/pgspecial/dbcommands.py -> build/bdist.linux-x86_64/wheel/./pgspecial 2025-10-12 22:28:40,817 root INFO running install_egg_info 2025-10-12 22:28:40,821 root INFO Copying pgspecial.egg-info to build/bdist.linux-x86_64/wheel/./pgspecial-2.2.1-py3.12.egg-info 2025-10-12 22:28:40,823 root INFO running install_scripts 2025-10-12 22:28:40,824 root INFO creating build/bdist.linux-x86_64/wheel/pgspecial-2.2.1.dist-info/WHEEL 2025-10-12 22:28:40,825 wheel INFO creating '/home/udu/aports/community/py3-pgspecial/src/pgspecial-2.2.1/.dist/.tmp-wmbmz6p6/pgspecial-2.2.1-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it 2025-10-12 22:28:40,826 wheel INFO adding 'pgspecial/__init__.py' 2025-10-12 22:28:40,826 wheel INFO adding 'pgspecial/dbcommands.py' 2025-10-12 22:28:40,827 wheel INFO adding 'pgspecial/iocommands.py' 2025-10-12 22:28:40,827 wheel INFO adding 'pgspecial/main.py' 2025-10-12 22:28:40,827 wheel INFO adding 'pgspecial/namedqueries.py' 2025-10-12 22:28:40,828 wheel INFO adding 'pgspecial/help/__init__.py' 2025-10-12 22:28:40,828 wheel INFO adding 'pgspecial/help/commands.py' 2025-10-12 22:28:40,828 wheel INFO adding 'pgspecial-2.2.1.dist-info/METADATA' 2025-10-12 22:28:40,829 wheel INFO adding 'pgspecial-2.2.1.dist-info/WHEEL' 2025-10-12 22:28:40,829 wheel INFO adding 'pgspecial-2.2.1.dist-info/top_level.txt' 2025-10-12 22:28:40,829 wheel INFO adding 'pgspecial-2.2.1.dist-info/RECORD' 2025-10-12 22:28:40,829 root INFO removing build/bdist.linux-x86_64/wheel 2025-10-12 22:28:40,830 gpep517 INFO The backend produced .dist/pgspecial-2.2.1-py3-none-any.whl pgspecial-2.2.1-py3-none-any.whl ============================= test session starts ============================== platform linux -- Python 3.12.11, pytest-8.3.5, pluggy-1.5.0 rootdir: /home/udu/aports/community/py3-pgspecial/src/pgspecial-2.2.1 configfile: pyproject.toml testpaths: tests collected 79 items tests/test_internal.py ................. [ 21%] tests/test_named_queries.py ... [ 25%] tests/test_specials.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE [ 87%] EEEEEEEsss [100%] ==================================== ERRORS ==================================== ________________________ ERROR at setup of test_slash_l ________________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ____________________ ERROR at setup of test_slash_l_pattern ____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ____________________ ERROR at setup of test_slash_l_verbose ____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _______________________ ERROR at setup of test_slash_du ________________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ___________________ ERROR at setup of test_slash_du_pattern ____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ___________________ ERROR at setup of test_slash_du_verbose ____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ________________________ ERROR at setup of test_slash_d ________________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ____________________ ERROR at setup of test_slash_d_verbose ____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ____________________ ERROR at setup of test_slash_d_table_1 ____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ____________________ ERROR at setup of test_slash_d_table_2 ____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ____________ ERROR at setup of test_slash_d_test_generated_default _____________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ________________ ERROR at setup of test_slash_d_table_verbose_1 ________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ________________ ERROR at setup of test_slash_d_table_verbose_2 ________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _________________ ERROR at setup of test_slash_d_view_verbose __________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _____________ ERROR at setup of test_slash_d_table_with_exclusion ______________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _______________ ERROR at setup of test_slash_d_table_2_in_schema _______________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _______________________ ERROR at setup of test_slash_dn ________________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _______________________ ERROR at setup of test_slash_dp ________________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ________________ ERROR at setup of test_slash_dp_pattern_table _________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ________________ ERROR at setup of test_slash_dp_pattern_schema ________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ________________ ERROR at setup of test_slash_dp_pattern_alias _________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _______________________ ERROR at setup of test_slash_ddp _______________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ___________________ ERROR at setup of test_slash_ddp_pattern ___________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _______________________ ERROR at setup of test_slash_dt ________________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ___________________ ERROR at setup of test_slash_dt_verbose ____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _______________________ ERROR at setup of test_slash_dv ________________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ___________________ ERROR at setup of test_slash_dv_verbose ____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _______________________ ERROR at setup of test_slash_dm ________________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ___________________ ERROR at setup of test_slash_dm_verbose ____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _______________________ ERROR at setup of test_slash_ds ________________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ___________________ ERROR at setup of test_slash_ds_verbose ____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _______________________ ERROR at setup of test_slash_di ________________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ___________________ ERROR at setup of test_slash_di_verbose ____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _______________________ ERROR at setup of test_slash_dx ________________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ___________________ ERROR at setup of test_slash_dx_verbose ____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _______________________ ERROR at setup of test_slash_dT ________________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _______________________ ERROR at setup of test_slash_dD ________________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ___________________ ERROR at setup of test_slash_dD_verbose ____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _______________________ ERROR at setup of test_slash_dF ________________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ___________________ ERROR at setup of test_slash_dF_verbose ____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _______________________ ERROR at setup of test_slash_db ________________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _____________________ ERROR at setup of test_slash_db_name _____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _______________________ ERROR at setup of test_slash_df ________________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ________________________ ERROR at setup of test_slash_h ________________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ____________________ ERROR at setup of test_slash_h_command ____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _____________________ ERROR at setup of test_slash_h_alias _____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ___________________ ERROR at setup of test_slash_copy_to_tsv ___________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ______ ERROR at setup of test_slash_copy_throws_error_without_TO_or_FROM _______ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _________________ ERROR at setup of test_slash_copy_to_stdout __________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ___________________ ERROR at setup of test_slash_copy_to_csv ___________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError __________________ ERROR at setup of test_slash_copy_from_csv __________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ______________ ERROR at setup of test_slash_copy_case_insensitive ______________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError _______________________ ERROR at setup of test_slash_sf ________________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ___________________ ERROR at setup of test_slash_sf_unknown ____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ____________________ ERROR at setup of test_slash_sf_parens ____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError ___________________ ERROR at setup of test_slash_sf_verbose ____________________ @pytest.fixture(scope="module") def connection(): create_db(TEST_DB_NAME) > connection = db_connection(TEST_DB_NAME) tests/conftest.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/dbutils.py:19: in db_connection conn = psycopg.connect( dbname = '_test_db' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist attempt = {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...} attempts = [{'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '::1', 'password': 'postgres', ...}, {'dbname': '_test_db', 'host': 'localhost', 'hostaddr': '127.0.0.1', 'password': 'postgres', ...}] autocommit = False cls = conninfo = 'user=postgres host=localhost password=postgres port=5432 dbname=_test_db hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "_test_db" does not exist') params = {'dbname': '_test_db', 'host': 'localhost', 'password': 'postgres', 'port': 5432, ...} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError =============================== warnings summary =============================== tests/test_specials.py:987 /home/udu/aports/community/py3-pgspecial/src/pgspecial-2.2.1/tests/test_specials.py:987: SyntaxWarning: invalid escape sequence '\c' executor("\copy (SELECT 'Montréal', 'Portland', 'Cleveland') INTO stdout ") -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ SKIPPED [1] tests/test_specials.py:1084: Unable to create a postgres_fdw extension. SKIPPED [1] tests/test_specials.py:1096: Unable to create a postgres_fdw extension. SKIPPED [1] tests/test_specials.py:1117: Unable to create a postgres_fdw extension. ============= 20 passed, 3 skipped, 1 warning, 56 errors in 1.75s ============== >>> ERROR: py3-pgspecial: check failed >>> py3-pgspecial: Uninstalling dependencies... (1/36) Purging .makedepends-py3-pgspecial (20251012.222839) (2/36) Purging py3-click-pyc (8.1.8-r1) (3/36) Purging py3-click (8.1.8-r1) (4/36) Purging py3-psycopg-c-pyc (3.1.20-r0) (5/36) Purging py3-psycopg-c (3.1.20-r0) (6/36) Purging py3-psycopg-pyc (3.1.20-r0) (7/36) Purging py3-psycopg (3.1.20-r0) (8/36) Purging py3-sqlparse-pyc (0.5.1-r0) (9/36) Purging py3-sqlparse (0.5.1-r0) (10/36) Purging py3-gpep517-pyc (19-r0) (11/36) Purging py3-gpep517 (19-r0) (12/36) Purging py3-installer-pyc (0.7.0-r2) (13/36) Purging py3-installer (0.7.0-r2) (14/36) Purging py3-setuptools_scm-pyc (8.3.1-r0) (15/36) Purging py3-setuptools_scm (8.3.1-r0) (16/36) Purging py3-setuptools-pyc (80.9.0-r0) (17/36) Purging py3-setuptools (80.9.0-r0) (18/36) Purging py3-wheel-pyc (0.46.1-r0) (19/36) Purging py3-wheel (0.46.1-r0) (20/36) Purging py3-pytest-pyc (8.3.5-r0) (21/36) Purging py3-pytest (8.3.5-r0) (22/36) Purging py3-iniconfig-pyc (2.1.0-r0) (23/36) Purging py3-iniconfig (2.1.0-r0) (24/36) Purging py3-packaging-pyc (25.0-r0) (25/36) Purging py3-packaging (25.0-r0) (26/36) Purging py3-parsing-pyc (3.2.3-r0) (27/36) Purging py3-parsing (3.2.3-r0) (28/36) Purging py3-pluggy-pyc (1.5.0-r0) (29/36) Purging py3-pluggy (1.5.0-r0) (30/36) Purging py3-py-pyc (1.11.0-r4) (31/36) Purging py3-py (1.11.0-r4) (32/36) Purging py3-configobj-pyc (5.0.9-r0) (33/36) Purging py3-configobj (5.0.9-r0) (34/36) Purging py3-six-pyc (1.17.0-r0) (35/36) Purging py3-six (1.17.0-r0) (36/36) Purging libpq (17.6-r0) Executing busybox-1.37.0-r19.trigger OK: 296 MiB in 89 packages